splitData: Split Data

Description Usage Arguments Details Value See Also

Description

Split an object into a training set and a validation set.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
splitData(object, split)

## S4 method for signature 'TrtDataObj'
splitData(object, split)

## S4 method for signature 'TrtDataIdeal'
splitData(object, split)

## S4 method for signature 'wClsObj'
splitData(object, split)

## S4 method for signature 'RegObj'
splitData(object, split)

Arguments

object

An object to be split.

split

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

Details

A function to split the objects into a list of two objects of the same type: one named trainObj and the other named validObj.

Value

Returns a list of two objects of the input type, trainObj and validObj, and the indice of the trainObj.

See Also

TrtDataObj-class TrtDataIdeal-class wClsObj-class RegObj-class


SkadiEye/ITRlearn documentation built on May 24, 2019, 1:31 a.m.