seldonian.dataset.DataSetLoader

class DataSetLoader(regime, **kwargs)

Bases: object

__init__(regime, **kwargs)

Object for loading datasets from disk into DataSet objects

Parameters:

regime (str) – The category of the machine learning algorithm, e.g., supervised_learning or reinforcement_learning

__repr__()

Return repr(self).

Methods

load_RL_dataset_from_csv(filename, metadata_filename=None)

Create RLDataSet object from file containing the episodes saved in a CSV file with format: episode_index,obs,action,reward,probability_of_action.

Parameters:
  • filename (str) – The file containing the data you want to load

  • metadata_filename (str) – Name of metadata file

Returns:

RLDataSet object

load_RL_dataset_from_episode_file(filename, metadata_filename=None)

Create RLDataSet object from pickle file containing list of episodes

Parameters:
  • filename (str) – The pickle file containing list of Episode objects

  • metadata_filename (str, defaults to None.) – Optional metadata filepath.

load_supervised_dataset(filename, metadata_filename, file_type='csv')

Create SupervisedDataSet object from file

Parameters:
  • filename (str) – The file containing the features, labels and sensitive attributes

  • metadata_filename (str) – The file containing the metadata describing the data in filename

  • file_type (str, defaults to 'csv') – the file extension of filename

Returns:

SupervisedDataSet object