split_test_train: Split into test train sets

View source: R/splits.R

split_test_trainR Documentation

Split into test train sets

Description

It makes sure that there is at least one representative of each class in the test test

Usage

split_test_train(yclass, split_prop)

Arguments

yclass

any vector with Y labels

split_prop

proportion of test samples

Value

indices of train test splits

Examples

y <- c(1,1,1,1,2,2,2,2,2,2,2,3,3)
split_test_train(y,0.2)

dokato/natML documentation built on Sept. 12, 2022, 6:04 a.m.