On 8/18/11 12:10 AM, [email protected] wrote:
I thought it would be useful for listener like the one for standard
deviation, that should know when a sample stream finishes. I will
implement it without the finished method and if it is needed we add it
later.
I am a little skeptical, because that cannot be supported by the current
API,
a client which just calls evaluateSample has no way to indicate that it
is now finished.
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.
Won't it break backward compatibility? If it is OK +1 to change it.
Yes, but only for classes which extend the Evaluator class, so it might
be better
to leave this intact, we can still do it, but then we need to declare
the new method
not as abstract.
Jörn