split
openml.tasks.split
#
OpenMLSplit
#
OpenMLSplit(name: int | str, description: str, split: dict[int, dict[int, dict[int, tuple[ndarray, ndarray]]]])
OpenML Split object.
This class manages train-test splits for a dataset across multiple repetitions, folds, and samples.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
The name or ID of the split.
TYPE:
|
description
|
A description of the split.
TYPE:
|
split
|
A dictionary containing the splits organized by repetition, fold, and sample.
TYPE:
|
Source code in openml/tasks/split.py
get
#
Returns the specified data split from the CrossValidationSplit object.
| PARAMETER | DESCRIPTION |
|---|---|
repeat
|
Index of the repeat to retrieve.
TYPE:
|
fold
|
Index of the fold to retrieve.
TYPE:
|
sample
|
Index of the sample to retrieve.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
The data split for the specified repeat, fold, and sample. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the specified repeat, fold, or sample is not known. |
Source code in openml/tasks/split.py
Split
#
Bases: NamedTuple
A single split of a dataset.