<< tiecorrect CHE3007S transform_MinMax >>

CHE3007S >> CHE3007S > train_test_split

train_test_split

Function to split data into subsets, for testing and training data

Syntax

[x_train, x_test, y_train, y_test] = train_test_split(x, y)
[x_train, x_test, y_train, y_test] = train_test_split(x, y, test_size)
[x_train, x_test, y_train, y_test] = train_test_split(x, y, test_size, shuffle)

Parameters

x:

x data to be split

y:

y data to be split

test_size:

The fraction of data to be split into test data, or number of data points to split into training data. The default value is 0.25.

shuffle:

A True/False value to shuffle the data or provide it in linear order. %t is the default value

x_train:

Split training x data

x_test:

Split testing x data

y_train:

Split training y data

y_test:

Split testing y data


Report an issue
<< tiecorrect CHE3007S transform_MinMax >>