evalml.preprocessing.split_data

class evalml.preprocessing.split_data[source]

Splits data into train and test sets.

Parameters
  • X (DataFrame) – features

  • y (Series) – labels

  • regression (bool) – if true, do not use stratified split

  • test_size (float) – percent of train set to holdout for testing

  • random_state (int) – seed for the random number generator

Returns

features and labels each split into train and test sets

Return type

DataFrame, DataFrame, Series, Series