System.out.println("Year\tActual\tPredict\tClosed Loop Predict");
for(int year=EVALUATE_START;year<EVALUATE_END;year++)
{
// calculate based on actual data
MLData input = new BasicMLData(WINDOW_SIZE);
for(int i=0;i<input.size();i++)
{
input.setData(i,this.normalizedSunspots[(year-WINDOW_SIZE)+i]);
}
MLData output = network.compute(input);
double prediction = output.getData(0);
this.closedLoopSunspots[year] = prediction;
// calculate "closed loop", based on predicted data
for(int i=0;i<input.size();i++)
{
input.setData(i,this.closedLoopSunspots[(year-WINDOW_SIZE)+i]);
}
output = network.compute(input);
double closedLoopPrediction = output.getData(0);
// display