Learn R Programming

morf (version 1.0.0)

class_honest_split: Honest Sample Split

Description

Randomly spits the sample into a training sample and an honest sample.

Usage

class_honest_split(data, honesty.fraction = 0.5)

Value

List with elements:

train_sample

Training sample.

honest_sample

Honest sample.

Arguments

data

data.frame or matrix to be split. The outcome must be located in the first column.

honesty.fraction

Fraction of honest sample.

Details

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.