mlrl.testbed.experiments.input.data module

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

Provides classes for representing input data.

class mlrl.testbed.experiments.input.data.DatasetInputData(properties: Properties, context: Context = Context(include_dataset_type=True, include_prediction_scope=True, include_fold=True))

Bases: InputData

An abstract base class for all classes that represent input data that can be converted into a dataset.

update_state(state: ExperimentState, input_data: Any)

See mlrl.testbed.experiments.input.data.InputData.update_state()

class mlrl.testbed.experiments.input.data.InputData(properties: Properties, context: Context = Context(include_dataset_type=True, include_prediction_scope=True, include_fold=True))

Bases: ABC

An abstract base class for all classes that represent input data.

class Properties(file_name: str)

Bases: object

Properties of input data.

Attributes:

file_name: A file name to be used for reading from input files

file_name: str
abstractmethod update_state(state: ExperimentState, input_data: Any)

Updates the state of an experiment based on given input data.

Parameters:
  • state – The state to be updated

  • input_data – The input data

class mlrl.testbed.experiments.input.data.TabularInputData(properties: Properties, context: Context = Context(include_dataset_type=True, include_prediction_scope=True, include_fold=True))

Bases: InputData, ABC

An abstract base class for all classes that represent input data that can be converted into a tabular representation.

class Properties(file_name: str, has_header: bool)

Bases: Properties

Properties of tabular input data.

Attributes:

has_header: True, if the tabular input data has a header, False otherwise

has_header: bool
update_state(state: ExperimentState, input_data: Any)

Updates the state of an experiment based on given input data.

Parameters:
  • state – The state to be updated

  • input_data – The input data