splitTrt: A function to split the 'trtInput' object into a list of two...

View source: R/2-1-import.R

splitTrtR Documentation

A function to split the trtInput object into a list of two trtInput objects: one names train and the other named valid.

Description

A function to split the trtInput object into a list of two trtInput objects: one names train and the other named valid.

Usage

splitTrt(object, split)

Arguments

object

A trtInput object.

split

A character, numeric variable or a numeric vector declaring a way to split the trtInput. If it's number between 0 and 1, all samples will be split into two subsets randomly, with the train containing such proportion of all samples and valid containing the rest. If split is a character and is "bootstrap", the train will be a bootstrap sample of the original data set and the valid will contain out-of-bag samples. If split is a vector of integers, the train will contain samples whose indice are in the vector, and valid will contain the rest.

Value

Returns a list of two trtInput objects.

See Also

trtInput-class


SkadiEye/deepTL documentation built on Nov. 17, 2022, 1:41 p.m.