class_honest_split: Honest Sample Split

View source: R/honesty.R

class_honest_splitR Documentation

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)

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.

Value

List with elements:

train_sample

Training sample.

honest_sample

Honest sample.


ocf documentation built on April 4, 2025, 4:44 a.m.