DataSplitter: DataSplitter

Description Usage Format Methods

Description

Splits a dataset into a train and test set.

Usage

1

Format

An object of class R6ClassGenerator of length 24.

Methods

initialize(test_set_size = 1)

Creates a new datasplitter

@param test_set_size (default = 1) an integer to specify the size of the test set to use.

split(data)

Splits the data in a train and test set. A block that was used as a test set previously is automatically appended to the traininset (so all data gets used for training that has been used for testing before).

In the current implementation it will always use the last observation as the test set observation. Eventually this should be configurable, and n number of observations should be includable.

@param data data.table the data to spit into a train and test set.

@param test_set_size integer (default = NULL) overrides the initialized test_set_size. If NULL, we use the initialized one (default).

@return list with two entries: train and test. Each containing the respective dataframe.

get_test_set_size

Active method. The size of the testset used by this splitter instance.


frbl/OnlineSuperLearner documentation built on Feb. 9, 2020, 9:28 p.m.