load_lipophilicity#

skfp.datasets.moleculenet.load_lipophilicity(data_dir: str | PathLike | None = None, as_frame: bool = False, verbose: bool = False) DataFrame | tuple[list[str]] | ndarray#

Load and return the Lipophilicity dataset.

The task is to predict octanol/water distribution coefficient (logD) at pH 7.4 [1]. Targets are already log transformed, and are a unitless ratio.

Tasks

1

Task type

regression

Total samples

4200

Recommended split

scaffold

Recommended metric

RMSE

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”, “label”. Otherwise, returns SMILES as list of strings, and labels as a NumPy array (1D float vector).

  • verbose (bool, default=False) – If True, progress bar will be shown for downloading or loading files.

Returns:

data – Depending on the as_frame argument, one of: - Pandas DataFrame with columns: “SMILES”, “label” - 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_lipophilicity
>>> dataset = load_lipophilicity()
>>> dataset  
(['Cn1c(CN2CCN(CC2)c3ccc(Cl)cc3)nc4ccccc14', ..., 'CN1C(=O)C=C(CCc2ccc3ccccc3c2)N=C1N'],
    array([ 3.54, -1.18,  3.69, ...,  2.1 ,  2.65,  2.7 ]))
>>> dataset = load_lipophilicity(as_frame=True)
>>> dataset.head() 
                                              SMILES  label
0            Cn1c(CN2CCN(CC2)c3ccc(Cl)cc3)nc4ccccc14   3.54
1  COc1cc(OC)c(cc1NC(=O)CSCC(=O)O)S(=O)(=O)N2C(C)...  -1.18
2             COC(=O)[C@@H](N1CCc2sccc2C1)c3ccccc3Cl   3.69
3  OC[C@H](O)CN1C(=O)C(Cc2ccccc12)NC(=O)c3cc4cc(C...   3.37
4  Cc1cccc(C[C@H](NC(=O)c2cc(nn2C)C(C)(C)C)C(=O)N...   3.10