Class Evaluator<T>
The Evaluator<T> is an abstract base class for evaluators.
Evaluation results are the arithmetic mean of the scores calculated for each reference sample.
public abstract class Evaluator<T> where T : class
Type Parameters
T
- Inheritance
-
Evaluator<T>
- Derived
- Inherited Members
Constructors
Evaluator(params IEvaluationMonitor<T>?[]?)
protected Evaluator(params IEvaluationMonitor<T>?[]? aListeners)
Parameters
aListenersIEvaluationMonitor<T>[]
Methods
Evaluate(IObjectStream<T?>)
Reads all sample objects from the stream and evaluates each sample object with EvaluateSample(T) method.
public void Evaluate(IObjectStream<T?> samples)
Parameters
samplesIObjectStream<T>the stream of reference which should be evaluated.
Exceptions
- IOException
IOException
EvaluateSample(T)
Evaluates the given reference object. The default implementation calls ProcessSample(T).
note: this method will be changed to private in the future. Implementations should override ProcessSample(T) instead. If this method is overridden, the implementation has to update the score after every invocation.public virtual void EvaluateSample(T sample)
Parameters
sampleTthe sample to be evaluated
ProcessSample(T)
Evaluates the given reference sample object.
The implementation has to update the score after every invocation.
protected abstract T ProcessSample(T reference)
Parameters
referenceTthe reference sample.
Returns
- T
the predicted sample