train_test: training and test

View source: R/trans_sample.R

train_testR 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)

daltoolbox documentation built on May 29, 2024, 1:57 a.m.