On 8/17/11 11:22 PM, [email protected] wrote:
Here is what I am planning to do:
I will rename the new listener to EvaluationSampleListener and add two new
methods. The method list would be:
void correctlyClassified(T reference, T prediction);
void missclassified(T reference, T prediction);
void evaluationFinished();
Why do we need the one for finished? The calling code knows when it is
finished,
and indicates that by retrieving the results, or making a call to print
them out.
Like it is implemented currently.
Since we are doing now a little more work here, we should make the
abstract Evaluator
class handle the calls to the EvaluationSampleListeners.
As far as I have seen on my last look in the code we would need to provide
a default implementation for the Evaluator.evaluateSample method, and
call a method
which an implementer overwrites (maybe Evaluator.processSample) from it,
it will return the
predicted sample, this way an equals test inside
Evaluator.evaluateSample can figure out if it needs
to call missclassified or correctlyClassified on the registered listeners.
Jörn