load_clintox#
- skfp.datasets.moleculenet.load_clintox(data_dir: str | PathLike | None = None, as_frame: bool = False, verbose: bool = False, force_update: bool = False) DataFrame | tuple[list[str], ndarray]#
Load the ClinTox dataset.
The task is to predict drug approval viability, by predicting clinical trial toxicity and final FDA approval status [1]. Both tasks are binary.
Tasks
2
Task type
multitask classification
Total samples
1477
Recommended split
scaffold
Recommended metric
AUROC
- Parameters:
data_dir ({None, str, path-like}, default=None) – Path to the root data directory. If
None, currently set scikit-learn directory is used, by default $HOME/scikit_learn_data.as_frame (bool, default=False) – If True, returns the raw DataFrame with columns “SMILES” and 2 label columns, FDA approval and clinical trial toxicity. Otherwise, returns SMILES as list of strings, and labels as a NumPy array (2D integer array).
verbose (bool, default=False) – If True, progress bar will be shown for downloading or loading files.
force_update (bool, default=False) – If True, always re-download the dataset from HuggingFace Hub, even if it is already present locally. If False, the dataset is downloaded only if it is not yet available locally.
- Returns:
data – Depending on the
as_frameargument, one of: - Pandas DataFrame with columns “SMILES” and 2 label columns - tuple of: list of strings (SMILES), NumPy array (labels)- Return type:
pd.DataFrame or tuple(list[str], np.ndarray)
References
Examples
>>> from skfp.datasets.moleculenet import load_clintox >>> dataset = load_clintox() >>> dataset (['[C@@H]1([C@@H]([C@@H]([C@H]([C@@H]([C@@H]1Cl)Cl)Cl)Cl)Cl)Cl', ..., 'S=[Se]=S'], array([[1, 0], [1, 0], [1, 0], ..., [1, 0], [1, 0], [1, 0]]))
>>> dataset = load_clintox(as_frame=True) >>> dataset.head() SMILES FDA_APPROVED CT_TOX 0 [C@@H]1([C@@H]([C@@H]([C@H]([C@@H]([C@@H]1Cl)C... 1 0 1 [C@H]([C@@H]([C@@H](C(=O)[O-])O)O)([C@H](C(=O)... 1 0 2 [H]/[NH+]=C(/C1=CC(=O)/C(=C\C=c2ccc(=C([NH3+])... 1 0 3 [H]/[NH+]=C(\N)/c1ccc(cc1)OCCCCCOc2ccc(cc2)/C(... 1 0 4 [N+](=O)([O-])[O-] 1 0