load_lrgb_mol_benchmark#

skfp.datasets.lrgb.load_lrgb_mol_benchmark(data_dir: str | PathLike | None = None, mol_type: str = 'SMILES', standardize_labels: bool = True, as_frames: bool = False, verbose: bool = False) Iterator[tuple[str, DataFrame]] | Iterator[tuple[str, list[str], ndarray]]#

Load and return the LRGB molecular datasets.

There are two datasets: Peptides-func (binary multitask classification) and Peptides-struct (multitask regression). Stratified random split is recommended for both, following LRGB [1]. See paper for details on stratification. AUPRC metric is recommended for Peptides-func, and MAE for Peptides-struct.

Dataset names are also returned (case-sensitive): “Peptides-func” and “Peptides-struct”.

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.

  • mol_type ({"SMILES", "aminoseq"}, default="SMILES") – Which molecule representation to return, either SMILES strings or aminoacid sequences.

  • standardize_labels (bool, default=True) – Whether to standardize labels to mean 0 and standard deviation 1 for Peptides-struct, following the recommendation from the original paper [1]. Otherwise, the raw property values are returned.

  • as_frames (bool, default=False) – If True, returns the raw DataFrame for each dataset. Otherwise, returns SMILES as a list of strings, and labels as a NumPy array for each dataset.

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

Returns:

data – Loads and returns datasets with a generator. Returned types depend on the as_frame and mol_type parameters, either: - Pandas DataFrame with columns: “SMILES”/”aminoseq”, “label” - tuple of: list of strings (SMILES / aminoacid sequences), NumPy array (labels)

Return type:

generator of pd.DataFrame or tuples (list[str], np.ndarray)

References