openml.tasks.OpenMLSplit

class openml.tasks.OpenMLSplit(name: int | str, description: str, split: dict[int, dict[int, dict[int, tuple[np.ndarray, np.ndarray]]]])

OpenML Split object.

Parameters:
nameint or str
descriptionstr
splitdict
get(repeat: int = 0, fold: int = 0, sample: int = 0) tuple[np.ndarray, np.ndarray]

Returns the specified data split from the CrossValidationSplit object.

Parameters:
repeatint

Index of the repeat to retrieve.

foldint

Index of the fold to retrieve.

sampleint

Index of the sample to retrieve.

Returns:
numpy.ndarray

The data split for the specified repeat, fold, and sample.

Raises:
ValueError

If the specified repeat, fold, or sample is not known.