libuplift.datasets.Information ============================== .. py:module:: libuplift.datasets.Information .. autoapi-nested-parse:: The marketing campaign dataset from the CRAN Information package by Kim Larsen. See: https://cran.r-project.org/web/packages/Information/index.html for details. .. !! processed by numpydoc !! Functions --------- .. autoapisummary:: libuplift.datasets.Information.fetch_Information Module Contents --------------- .. py:function:: fetch_Information(version='train', data_home=None, download_if_missing=True, random_state=None, shuffle=False, categ_as_strings=False, return_X_y=False, as_frame=False) Load the marketing campaign dataset from the CRAN Information package by Kim Larsen. See: https://cran.r-project.org/web/packages/Information/index.html Two datasets are available: "train" and "validation". Use version argument to select. Download it if necessary. :Parameters: **data_home** : string, 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_missing** : boolean, 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_state** : int, RandomState instance or None (default) Determines random number generation for dataset shuffling. Pass an int for reproducible output across multiple function calls. **shuffle** : bool, default=False Whether to shuffle dataset. **categ_as_strings** : bool, default=False Whether to return categorical variables as strings. **return_X_y** : boolean, default=False. If True, returns ``(data.data, data.target)`` instead of a Bunch object. **as_frame** : boolean, 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: **dataset** : dict-like object with the following attributes: .. **dataset.data** : numpy array Each row corresponds to the features in the dataset. **dataset.target** : numpy array Each value is 1 if a purchase was made 0 otherwise. **dataset.DESCR** : string Description of the dataset. **(data, target_conversion, target_visit, target_exposure)** : tuple if ``return_X_y`` is True .. !! processed by numpydoc !!