train.train(network, in, out);
System.out.printf("Solution in %d iteration, minError = %f, lastError: %f\n\n", out.lastIterationNumber, out.minError, out.lastError);
final XYSeries series2 = new XYSeries("Prediction");
SimulationIterator iterator;
for (int i = 0; i < input.length; i++) {
for (iterator = train.simulate(input[i]); iterator.hasNext();) {
series2.add(input[i][0], iterator.next());
}
}
XYSeriesCollection collection = new XYSeriesCollection();
collection.addSeries(series1);