libuplift.datasets.Lazada#

Lazada E-comerce dataset.

See kailiang-zhong/DESCN for details.

Functions#

fetch_Lazada([version, data_home, ...])

Load the Lazada e-comerce dataset.

Module Contents#

libuplift.datasets.Lazada.fetch_Lazada(version='test', data_home=None, download_if_missing=True, random_state=None, shuffle=False, categ_as_strings=False, return_X_y=False, as_frame=False)[source]#

Load the Lazada e-comerce dataset.

Download it if necessary.

There is a training and test set available. The test dataset comes from a randomized experiment, in the training set assignment is biased.

Details of the dataset can be found in the following paper: https://arxiv.org/pdf/2207.09920.

The license is available here

Parameters:
versionstring, optional

Specify whether to return training (‘train’) or testing (‘test’) dataset. Test dataset comes from a randomized experiment, in the training set assignment is biased.

data_homestring, optional

Specify another download and cache folder for the datasets. By default all scikit-learn data is stored in ‘~/scikit_learn_data’ subfolders.

download_if_missingboolean, default=True

If False, raise a IOError if the data is not locally available instead of trying to download the data from the source site.

random_stateint, RandomState instance or None (default)

Determines random number generation for dataset shuffling. Pass an int for reproducible output across multiple function calls.

shufflebool, default=False

Whether to shuffle dataset.

categ_as_stringsbool, default=False

Whether to return categorical variables as strings.

return_X_yboolean, default=False.

If True, returns (data.data, data.target) instead of a Bunch object.

as_frameboolean, default=False

If True features are returned as pandas DataFrame. If False features are returned as object or float array. Float array is returned if all features are floats.

Returns:
datasetdict-like object with the following attributes:
dataset.datanumpy array

Each row corresponds to the features in the dataset.

dataset.target_visitnumpy array

Each value is 1 if website visit occurred 0 otherwise.

dataset.target_conversionnumpy array

Each value is 1 if purchase occurred 0 otherwise.

dataset.target_spendnumpy array

Each value corresponds to the amount of money spent.

dataset.DESCRstring

Description of the Hillstrom dataset.

(data, target_conversion, target_visit, target_exposure)tuple if

return_X_y is True