get_supervised_metrics()

Load supervised DMS benchmark metrics (Zenodo v1.2).

This function
  • Ensures the cache directory exists
  • Downloads the benchmark ZIP if missing
  • Loads 'merged_scores_substitutions_DMS.csv'
  • Returns it as a pandas DataFrame
Parameters:
  • cache_dir (str, default: '.cache' ) –

    Directory to store or read cached files. Defaults to ".cache".

Returns:
  • DataFrame

    pandas.DataFrame: The merged supervised benchmark scores.

Source code in proteingympy/make_supervised_scores.py
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
def get_supervised_metrics(cache_dir: str = ".cache") -> pd.DataFrame:
    """
    Load supervised DMS benchmark metrics (Zenodo v1.2).

    This function:
      - Ensures the cache directory exists
      - Downloads the benchmark ZIP if missing
      - Loads 'merged_scores_substitutions_DMS.csv'
      - Returns it as a pandas DataFrame

    Args:
        cache_dir (str, optional): Directory to store or read cached files.
                                   Defaults to ".cache".

    Returns:
        pandas.DataFrame: The merged supervised benchmark scores.
    """

    # Normalize and create cache directory if necessary
    cache_dir = os.path.abspath(cache_dir)
    os.makedirs(cache_dir, exist_ok=True)

    # Load merged scores via helper function
    benchmark_table = _load_from_zenodo_v12_supervised(cache_dir)

    return benchmark_table