train_test | R Documentation |
training and test partition of a dataset using a sampling method
train_test(obj, data, perc = 0.8, ...)
obj |
object |
data |
dataset |
perc |
percentage for training |
... |
optional arguments. |
train and test sets
#using random sampling
sample <- sample_random()
tt <- train_test(sample, iris)
# distribution of train
table(tt$train$Species)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.