mlrl.testbed.experiments.input.dataset.splitters.splitter module

Author: Michael Rapp (michael.rapp.ml@gmail.com)

Provides classes for implementing splitters that split datasets into training and test datasets.

class mlrl.testbed.experiments.input.dataset.splitters.splitter.DatasetSplitter

Bases: ABC

An abstract base class for all classes that split a dataset into training and test data.

class Split

Bases: ABC

An abstract base class for all classes that represent a split of a dataset into training and test datasets.

abstractmethod get_state(dataset_type: DatasetType) ExperimentState

Returns a state that stores the dataset that corresponds to a specific DatasetType.

Parameters:

dataset_type – The DatasetType

Returns:

A state that stores the dataset that corresponds to the given DatasetType

abstractmethod split(problem_domain: ProblemDomain) Generator[Split, None, None]

Returns a generator that generates the individual splits of the dataset into training and test data.

Parameters:

problem_domain – The problem domain, the dataset is concerned with

Returns:

The generator