Create a user-defined S3 object of class partition for the SetTarget function

Share:

Description

Creates a list object used by the SetTarget function to specify either Training/Validation/Holdout (validationType = 'TVH') or cross-validation (validationType = 'CV') partitions of the modeling dataset based on the values included in a column from the dataset. In either case, the name of this data column must be specified (as userPartitionCol). For the 'TVH' option, the column must have either exactly 3 values (in which case the values used to specify each level must be given) or exactly 2 values (in which case training and validation levels should be specified, but), while for the 'CV' option, only the level that specifies the holdout subset must be given.

Usage

1
2
CreateUserPartition(validationType, userPartitionCol, cvHoldoutLevel = NULL,
  trainingLevel = NULL, holdoutLevel = NULL, validationLevel = NULL)

Arguments

validationType

Character string specifying the type of partition generated, either 'TVH' or 'CV'.

userPartitionCol

Character string naming the data column from the modeling dataset containing the subset designations.

cvHoldoutLevel

Data value from userPartitionCol that identifies the holdout subset under the 'CV' option.

trainingLevel

Data value from userPartitionCol that identifies the training subset under the 'TVH' option.

holdoutLevel

Data value from userPartitionCol that identifies the holdout subset under the 'TVH' option.

validationLevel

Data value from userPartitionCol that identifies the validation subset under the 'TVH' option.

Details

This function is one of several convenience functions provided to simplify the task of starting modeling projects with custom partitioning options. The other functions are CreateGroupPartition, CreateRandomPartition, and CreateStratifiedPartition.

Value

An S3 object of class 'partition' including the parameters required by the SetTarget function to generate a user-specified of the modeling dataset.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.