Randomly spits the sample into a training sample and an honest sample.
class_honest_split(data, honesty.fraction = 0.5)
List with elements:
train_sample
Training sample.
honest_sample
Honest sample.
data.frame
or matrix
to be split. The outcome must be located in the first column.
Fraction of honest sample.
class_honest_split
looks for balanced splits, i.e., splits such as all the outcome's classes are represented
in both the training and the honest sample. After 100 trials, the program throws an error.