gemseo / utils / metrics

Hide inherited members

element_wise_metric module

An element-wise metric.

An element-wise metric applies a metric on each element of two collections of the same size.

class gemseo.utils.metrics.element_wise_metric.ElementWiseMetric(metric)[source]

Bases: BaseCompositeMetric[_InputT, Any]

An element-wise metric.

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

Parameters:

metric (BaseMetric[Any, Any]) – The metric the composite metric relies on.

compute(a, b)[source]

Evaluate the metric.

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

  • b (_InputT) – A second quantity.

Returns:

The metric associated with a and b.

Return type:

list[Any]