gemseo.utils.metrics.dataset_metric module#

A metric for comparing Dataset objects row-wisely.

class 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 name of the metric applied at element level.

  • group_names (StrColumnType) --

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

    By default it is set to ().

  • variable_names (StrColumnType) --

    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 (ComponentType) --

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

    By default it is set to ().

  • indices (IndexType) --

    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:
Returns:

The metric associated with a and b.

Return type:

Dataset