Datasets

The pyuplift.datasets module includes utilities to load datasets, including methods to download and return popular datasets. It also features some artificial data generators.

Loaders

datasets.download_criteo_uplift_prediction([data_home, url]) Downloading the Criteo Uplift Prediction dataset.
datasets.load_criteo_uplift_prediction([data_home, download_if_missing]) Loading the Criteo Uplift Prediction dataset from the local file.
datasets.download_hillstrom_email_marketing([data_home, url]) Downloading the Hillstrom Email Marketing dataset.
datasets.load_hillstrom_email_marketing([data_home, load_raw_data, download_if_missing]) Loading the Hillstrom Email Marketing dataset from the local file.
datasets.download_lalonde_nsw([data_home, control_data_url, treated_data_url, separator, column_names, column_types, random_state]) Downloading the Lalonde NSW dataset.
datasets.load_lalonde_nsw([data_home, load_raw_data, download_if_missing]) Loading the Lalonde NSW dataset from the local file.

Generators

datasets.make_linear_regression(size, [x1_params, x2_params, x3_params, t_params, e_params, eps, seed])
Generate data by formula: Y’ = X1+X2*T+E
Y = Y’, if Y’ - int(Y’) > eps,
Y = 0, otherwise.