split_dataset

Split the dataset into train and test subsets randomly.

Syntax

Description

Split the dataset with features X and labels Y into X1, X2, Y1, Y2 randomly. The order of the features and their corresponding labels remain unchanged. The proportion of the dataset X to include in the train split X1 is 15% as default.

It's similar to the function sklearn.model_selection.train_test_split.


The proportion of the dataset X to include in the train split X1 is specified by percent.

Examples

Input Arguments

X —— Feature vectors, specified as an array of vectors of length n.


Y —— Labels, specified as an array of vectors of numeric scalars of length n.


percent —— The proportion of the dataset X to include in the train split X1, specified as a positive float number in [0,1].

Properties of Arguments

Name of the parametersIs optional?Source, dialog or input port?
XNoInput port
YNoInput port
percentYesDialog

Output Arguments

A tuple (X1, Y1, X2, Y2).