AbstractSensorCellsToRegionConnect retinaToRegion = new SensorCellsToRegionRectangleConnect();
retinaToRegion.connect(retina.getVisionCells(), region, 0, 0);
SpatialPooler spatialPooler = new SpatialPooler(region);
spatialPooler.setLearningState(true);
TemporalPooler temporalPooler = new TemporalPooler(spatialPooler,
(int) newSynapseCount);
temporalPooler.setLearningState(true);
retina.seeBMPImage("2.bmp");
int totalNumberOfSequenceSegments = 0;
int totalNumberOfLearningNeurons = 0;
for (int i = 0; i < (int) numberOfIterations; i++) {
spatialPooler.performPooling();
temporalPooler.performPooling();
temporalPooler.getLearningAlgorithmStatistics().updateModelLearningMetrics(temporalPooler.getRegion());
totalNumberOfSequenceSegments += temporalPooler.getLearningAlgorithmStatistics()
.getTotalNumberOfSequenceSegmentsInCurrentTimeStep();
totalNumberOfLearningNeurons += temporalPooler
.getNumberOfCurrentLearningNeurons();
temporalPooler.nextTimeStep();
}
// --------------------compute SPandTP score----------------------------
double SPandTPScore = -(totalNumberOfSequenceSegments + totalNumberOfLearningNeurons)