neuralmonkey.evaluators.average module

class neuralmonkey.evaluators.average.AverageEvaluator(name: str = None) → None

Bases: neuralmonkey.evaluators.evaluator.Evaluator

Just average the numeric output of a runner.

score_instance(hypothesis: float, reference: float) → float

Score a single hyp/ref pair.

The default implementation of this method returns 1.0 when the hypothesis and the reference are equal and 0.0 otherwise.

Parameters:
  • hypothesis – The model prediction.
  • reference – The golden output.
Returns:

A float.