opendataval.dataloader#

Create data sets and loads with DataFetcher.

Data Loader#

Provides an API to add new data sets and load them with the data loader. To create a new data set, create a Register object to register the data set with a name. Then load the data set with DataFetcher. This allows us the flexibility to call the dataset later and to define separate functions/classes for the covariates and labels of a data set

Creating/Loading data sets#

Register(dataset_name[, one_hot, cacheable, ...])

Register a data set by defining its name and adding functions to retrieve data.

DataFetcher(dataset_name[, cache_dir, ...])

Load data for an experiment from an input data set name.

datasets

Data sets registered with Register.

Utils#

cache(url, cache_dir[, file_name, ...])

Download a file if it it is not present and returns the filepath.

mix_labels(fetcher[, noise_rate])

Mixes y_train labels of a DataFetcher, adding noise to data.

one_hot_encode(data)

One hot encodes a numpy array.

CatDataset(*datasets)

Data set wrapping indexable Datasets.