cardea.modeling.Modeler.train_test_split

static Modeler.train_test_split(X, y, test_size=0.2, shuffle=True)[source]

Split the training dataset and the testing dataset.

Parameters
  • X (pandas.DataFrame or ndarray) – Inputs to the pipeline.

  • y (pandas.Series or ndarray) – Target values.

  • test_size (float) – The proportion of the dataset to include in the test dataset.

  • shuffle (bool) – Whether or not to shuffle the data before splitting.

Returns

List containing the train-test split of the inputs and targets.

Return type

list