autointent.context.data_handler.split_dataset#
- autointent.context.data_handler.split_dataset(dataset, split, test_size, random_seed, is_few_shot=False, examples_per_intent=8, 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.
is_few_shot (bool) – Whether the dataset is a few-shot dataset.
examples_per_intent (int) – Number of examples per label for few-shot datasets.
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: