Consider last instance in filter and aggregator

This fixes an issue when running the VHT classifier with prequential evaluation, where
by ignoring the last instance property in filter/aggregator, the topology exited before
evaluating all instances.

Can be tested with:
`bin/samoa local target/SAMOA-Local-0.3.0-SNAPSHOT.jar "PrequentialEvaluation -d /tmp/dump.csv -i 1000000 -f 100000 -l (com.yahoo.labs.samoa.learners.classifiers.trees.VerticalHoeffdingTree -p 4) -s (com.yahoo.labs.samoa.moa.streams.generators.RandomTreeGenerator -c 2 -o 10 -u 10)"`
We are thinking in removing this method as we think this list of
contentEvent is not needed anymore...



On Wed, Nov 5, 2014 at 11:19 PM, Matthieu Morel <notifications@github.com>
wrote:

> In
> samoa-api/src/main/java/com/yahoo/labs/samoa/learners/classifiers/trees/ModelAggregatorProcessor.java:
>
> > @@ -295,6 +295,13 @@ private void processInstanceContentEvent(InstancesContentEvent instContentEvent)
> >              if (this.numBatches == 1 || this.numBatches > 4){
> >                  this.processInstances(this.contentEventList.remove(0));
> >              }
> > +
> > +            if (instContentEvent.isLastEvent()) {
> > +                // drain remaining instances
> > +                while (!contentEventList.isEmpty()) {
> > +                    processInstances(contentEventList.remove(0));
>
> We need to drain because the condition in line 295 sometimes evaluates to
> false. Do we actually need to branch there?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/yahoo/samoa/pull/112/files#r19878968>.
>