rxn.metrics.metrics_calculator.MetricsCalculator

class rxn.metrics.metrics_calculator.MetricsCalculator[source]

Bases: ABC

Base class for calculating metrics and returning them in a dictionary.

__init__()

Methods

__init__()

from_metrics_files(metrics_files)

Build the instance from the MetricsFiles object.

get_metrics()

Calculate the metrics.

abstract classmethod from_metrics_files(metrics_files)[source]

Build the instance from the MetricsFiles object.

Parameters
Return type

TypeVar(CalculatorT, bound= MetricsCalculator)

abstract get_metrics()[source]

Calculate the metrics.

Note: the paths to ground truth and prediction are to be set in the constructor of the derived class.

Return type

Dict[str, Any]