gemseo.utils.metrics.base_metric module#

A base metric class to compare two quantities.

class BaseMetric[source]#

Bases: Generic[_InputT, _OutputT]

A base class to implement metrics.

A metric is used to compare two quantities a and b.

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

_OutputT