load_bbbp#

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

Load and return the BBBP (Blood-Brain Barrier Penetration) dataset.

The task is to predict blood-brain barrier penetration (barrier permeability) of small drug-like molecules [1] [2].

Tasks

1

Task type

classification

Total samples

2039

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”, “label”. Otherwise, returns SMILES as list of strings, and labels as a NumPy array (1D integer binary 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_bbbp
>>> dataset = load_bbbp()
>>> dataset  
(['[Cl].CC(C)NCC(O)COc1cccc2ccccc12', ..., '[N+](=NCC(=O)N[C@@H]([C@H](O)C1=CC=C([N+]([O-])=O)C=C1)CO)=[N-]'], array([1, 1, 1, ..., 1, 1, 1]))
>>> dataset = load_bbbp(as_frame=True)
>>> dataset.head() 
                                              SMILES  label
0                   [Cl].CC(C)NCC(O)COc1cccc2ccccc12      1
1           C(=O)(OC(C)(C)C)CCCc1ccc(cc1)N(CCCl)CCCl      1
2  c12c3c(N4CCN(C)CC4)c(F)cc1c(c(C(O)=O)cn2C(C)CO...      1
3                   C1CCN(CC1)Cc1cccc(c1)OCCCNC(=O)C      1
4  Cc1onc(c2ccccc2Cl)c1C(=O)N[C@H]3[C@H]4SC(C)(C)...      1