Skip to content

Catalog (mtb.catalog)

The datasets and the metrics, as DataFrames.

Name Summary
mtb.catalog.datasets The datasets mtb.data.fetch downloads or mtb.load_results holds.
mtb.catalog.metrics Table describing the metrics: one row per metric code.

mtb.catalog.datasets

datasets(*, category: str | None = None) -> DataFrame

The datasets mtb.data.fetch downloads or mtb.load_results holds.

PARAMETERS DESCRIPTION
category

vertical, diagonal, mosaic or cross: only the datasets of that category; None = all.

type str | None default None

RETURNS DESCRIPTION
DataFrame

One row per dataset: dataset, category and has_results (mtb.load_results has stored results for it). mtb.data.fetch downloads every one.

Examples

>>> import multibench as mtb
>>> ds = mtb.catalog.datasets()
>>> ds.dataset.tolist()
>>> ds[ds.has_results]

mtb.catalog.metrics

metrics() -> DataFrame

Table describing the metrics: one row per metric code.

RETURNS DESCRIPTION
DataFrame

One row per metric code: metric, family (clustering, batch or classification, the families metrics= takes) and description.

Examples

>>> import multibench as mtb
>>> tab = mtb.catalog.metrics()
>>> tab.set_index("metric").loc["kBET", "description"]
See Also

mtb.evaluate : computes these metrics for an embedding.