split_data: Split data into training and test sets

split_dataR Documentation

Split data into training and test sets

Description

Split data into training and test sets, optionally standardizing by training set centers and standard deviations

Usage

split_data(data, test.id = NULL, train.id = NULL, standardize = FALSE)

Arguments

data

data frame with rows as samples, columns as features

test.id

integer vector of indices for test set. If NULL (default), all samples are used.

train.id

integer vector of indices for training set. If NULL (default), all samples are used.

standardize

logical; if TRUE, the training sets are standardized on features to have mean zero and unit variance. The test sets are standardized using the vectors of centers and standard deviations used in corresponding training sets.


AlineTalhouk/splendid documentation built on Feb. 23, 2024, 9:37 p.m.