libuplift.datasets.tDCS#
tDCS dataset from Kaggle.
A randomized controlled trial dataset for tDCS (transcranial direct current stimulation) for allergic rhinitis treatment. Dataset from: https://www.kaggle.com/datasets/ziya07/randomized-controlled-trial-dataset
The dataset contains information about patients undergoing tDCS treatment for allergic rhinitis, including demographic information, treatment details, and outcomes.
Functions#
|
Load the tDCS dataset (uplift classification). |
Module Contents#
- libuplift.datasets.tDCS.fetch_tDCS(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 tDCS dataset (uplift classification).
Download it if necessary.
The treatment can be Sham (control) of tDCS. There is also a polarity attribute describing treatment polarity ‘-’ for controls.
The main target variable is whether a petient positively responded to treatment. Additional targets include measured biomarkers and symptom scores assessed at various time points after therapy.
- Parameters:
- 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.targetnumpy array
Each value is 1 if treatment was successful, 0 otherwise.
- dataset.treatmentnumpy array
Each value indicates the treatment group (0 or 1).
- dataset.DESCRstring
Description of the tDCS dataset.
- (data, target, treatment)tuple if
return_X_yis True