train_test {daltoolbox} | R Documentation |
training and test
Description
training and test partition of a dataset using a sampling method
Usage
train_test(obj, data, perc = 0.8, ...)
Arguments
obj |
object |
data |
dataset |
perc |
percentage for training |
... |
optional arguments. |
Value
train and test sets
Examples
#using random sampling
sample <- sample_random()
tt <- train_test(sample, iris)
# distribution of train
table(tt$train$Species)
[Package daltoolbox version 1.0.767 Index]