gemseo / utils / metrics

Show inherited members

dataset_metric module

A metric for comparing Dataset objects row-wisely.

class gemseo.utils.metrics.dataset_metric.DatasetMetric(composed_metric, group_names=(), variable_names=(), components=(), indices=())[source]

Bases: BaseCompositeMetric[Dataset, Dataset]

A metric for comparing Dataset objects row-wisely.

Initialize self. See help(type(self)) for accurate signature.

Parameters:
  • composed_metric (BaseMetric[Any, Any]) – The description is missing.

  • group_names (str | Iterable[str]) –

    The name(s) of the group(s) to compare. If empty, consider all the groups.

    By default it is set to ().

  • variable_names (str | Iterable[str]) –

    The name(s) of the variables(s) to compare. If empty, consider all the variables of the considered groups.

    By default it is set to ().

  • components (int | Iterable[int]) –

    The component(s) to compare. If empty, consider all the components of the considered variables.

    By default it is set to ().

  • indices (str | int | Iterable[str | int]) –

    The index (indices) of the dataset to compare. If empty, consider all the indices.

    By default it is set to ().

compute(a, b)[source]

Evaluate the metric.

Parameters:
  • a (Dataset) – A first quantity.

  • b (Dataset) – A second quantity.

Returns:

The metric associated with a and b.

Return type:

Dataset