autointent.context.data_handler.split_dataset#

autointent.context.data_handler.split_dataset(dataset, split, test_size, random_seed, allow_oos_in_train=None)#

Split a Dataset object into training and testing subsets.

Parameters:
  • dataset (autointent.Dataset) – The dataset to split, which must include training data.

  • split (str) – The specific data split to divide.

  • test_size (float) – Proportion of the dataset to include in the test split.

  • random_seed (int | None) – Seed for random number generation.

  • allow_oos_in_train (bool | None) – Whether to allow OOS samples in train split.

Returns:

A tuple containing two subsets of the selected split.

Return type:

tuple[datasets.Dataset, datasets.Dataset]