public static double evaluate(BasicNetwork network, MLDataSet training) {
ResilientPropagation rprop = new ResilientPropagation(network, training);
double startingError = network.calculateError(training);
for (int i = 0; i < ITERATIONS; i++) {
rprop.iteration();
}
double finalError = network.calculateError(training);
return startingError - finalError;
}