powered by
Splits dataset into training and testing sets.
train_test_split(X, y, test_size = 0.2, seed = NULL)
list
features
labels
proportion for test set
for random seed
Provides functionality for train_test_split operations.
VectorForgeML-package
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