split_data

data.split_data(X, y, holdout_size=0.2, random_seed=None)

Split the data into train and test sets.

Parameters

Name Type Description Default
X ndarray The feature data to be split. A 2D array with shape (n_samples, 1). required
y ndarray The target data to be split. A 1D array with shape (n_samples,). required
holdout_size float The proportion of the data to be used as the test set. 0.2
random_seed int Seed to control randomness. None

Returns

Type Description
tuple The split train and test data: (X_train, X_test, y_train, y_test).