split_data: Split data

View source: R/split_data_class.R

split_dataR Documentation

Split data

Description

The data matrix is divided into two subsets.A predefined proportion of the samples are randomly selected for a training set, and the remaining samples are used for the test set.

Usage

split_data(p_train, ...)

Arguments

p_train

(numeric) The proportion of samples selected for the training set.

...

Additional slots and values passed to struct_class.

Value

A split_data object with the following output slots:

training (DatasetExperiment) A DatasetExperiment object containing samples selected for the training set.
testing (DatasetExperiment) A DatasetExperiment object containing samples selected for the testing set.

Inheritance

A split_data object inherits the following struct classes:

⁠[split_data]⁠ >> ⁠[model]⁠ >> ⁠[struct_class]⁠

Examples

M = split_data(
      p_train = 0.75)

M = split_data(p_train=0.75)


computational-metabolomics/structtoolbox documentation built on July 2, 2024, 10:46 p.m.