nip.scenario_base.data.Dataset

nip.scenario_base.data.Dataset#

class nip.scenario_base.data.Dataset(hyper_params: HyperParameters, settings: ExperimentSettings, protocol_handler: ProtocolHandler, split: Literal['train', 'test', 'validation'] = 'train')[source]#

Base class for all datasets.

All datasets should have the following keys:

  • “y”: The true label (0 or 1).

  • “id”: The index of the data point.

Dataset will have additional keys specifying the input instance.

Parameters:
  • hyper_params (HyperParameters) – The parameters for the experiment.

  • settings (ExperimentSettings) – The settings for the experiment.

  • protocol_handler (ProtocolHandler) – The protocol handler for the experiment.

  • split (Literal["train", "test", "validation"], default="train") – The split of the dataset to load.

Methods Summary

__getitem__(index)

__init__(hyper_params, settings, ...[, split])

__len__()

Attributes

instance_keys

The keys specifying the input instance.

keys

The keys (field names) in the dataset.

Methods

abstract __getitem__(index: None | int | slice | str | Tensor | List[Any] | Tuple[Any, ...]) Any[source]#
__init__(hyper_params: HyperParameters, settings: ExperimentSettings, protocol_handler: ProtocolHandler, split: Literal['train', 'test', 'validation'] = 'train')[source]#
abstract __len__() int[source]#