BinManager { public final int getResultFeatureCount() { if (hasPostProcessor()) { return postFeatureCount; } else { return outputFeatureCount; } } BinManager();  BinManager(VariableContext variableContext, Aggregator... aggregators);  BinManager(VariableContext variableContext, CellProcessorConfig cellProcessorConfig, Aggregator... aggregators); final VariableContext getVariableContext(); final int getSpatialFeatureCount(); final int getTemporalFeatureCount(); final int getOutputFeatureCount(); final String[] getSpatialFeatureNames(); final String[] getTemporalFeatureNames(); final int getPostProcessFeatureCount(); final String[] getOutputFeatureNames(); final String[] getPostProcessFeatureNames(); final int getResultFeatureCount(); final String[] getResultFeatureNames(); final int getAggregatorCount(); final Aggregator getAggregator(int aggIndex); final Vector getSpatialVector(SpatialBin bin, int aggIndex); final Vector getTemporalVector(TemporalBin bin, int aggIndex); WritableVector createOutputVector(); SpatialBin createSpatialBin(long binIndex); void aggregateSpatialBin(Observation observation, SpatialBin spatialBin); void completeSpatialBin(SpatialBin spatialBin); TemporalBin createTemporalBin(long binIndex); TemporalBin createTemporalBin(long binIndex, Iterable<? extends SpatialBin> spatialBins); void aggregateTemporalBin(SpatialBin inputBin, TemporalBin outputBin); void aggregateTemporalBin(TemporalBin inputBin, TemporalBin outputBin); void completeTemporalBin(TemporalBin temporalBin); TemporalBin createOutputBin(long binIndex); void computeOutput(TemporalBin temporalBin, WritableVector outputVector); boolean hasPostProcessor(); TemporalBin createProcessBin(long binIndex); void postProcess(Vector outputVector, WritableVector postVector); void setBinTracer(BinTracer binTracer); BinTracer getBinTracer();  }
@Test public void testGetResultFeatureCount_noPostProcessor() { final VariableContext variableContext = createVariableContext(); final BinManager binManager = new BinManager(variableContext, new AggregatorAverageML(variableContext, "e", 0.5)); final int featureCount = binManager.getResultFeatureCount(); assertEquals(4, featureCount); }
@Test public void testGetResultFeatureCount_withPostProcessor_targetName() { final VariableContext variableContext = createVariableContext(); final FeatureSelection.Config ppSelection = new FeatureSelection.Config("out_max"); final BinManager binManager = new BinManager(variableContext, ppSelection, new AggregatorMinMax(variableContext, "f", "out")); final int featureCount = binManager.getResultFeatureCount(); assertEquals(1, featureCount); }
@Test public void testGetResultFeatureCount_withPostProcessor() { final VariableContext variableContext = createVariableContext(); final FeatureSelection.Config ppSelection = new FeatureSelection.Config("f_max"); final BinManager binManager = new BinManager(variableContext, ppSelection, new AggregatorMinMax(variableContext, "f", "f")); final int featureCount = binManager.getResultFeatureCount(); assertEquals(1, featureCount); }