Learn R Programming

iai (version 1.0.0)

split_data: split_data

Description

Split the data into training and test datasets

Usage

split_data(task, X, ...)

Arguments

task

The type of problem.

X

The features of the data.

...

Other parameters, including zero or more target vectors as required by the problem type. Refer to the Julia documentation for available parameters.

Details

Julia Equivalent: IAI.split_data

Examples

Run this code
# NOT RUN {
X <- iris[, 1:4]
y <- iris$Species
iai::iai_setup()
split <- iai::split_data("classification", X, y, train_proportion = 0.75)
train_X <- split[[1]][[1]]
train_y <- split[[1]][[2]]
test_X <- split[[2]][[1]]
test_y <- split[[2]][[2]]
# }

Run the code above in your browser using DataLab