Learn R Programming

VectorForgeML (version 0.1.0)

train_test_split: Train Test Split

Description

Splits dataset into training and testing sets.

Usage

train_test_split(X, y, test_size = 0.2, seed = NULL)

Value

list

Arguments

X

features

y

labels

test_size

proportion for test set

seed

for random seed

Details

Provides functionality for train_test_split operations.

See Also

VectorForgeML-package

Examples

Run this code
  X <- matrix(rnorm(20), nrow=10)
  y <- sample(0:1, 10, replace=TRUE)
  train_test_split(X, y, test_size=0.2)

Run the code above in your browser using DataLab