public double calculateScore(final MLMethod algo) {
ErrorCalculation ec = this.errorCalc.create();
final RegressionAlgorithm ralgo = (RegressionAlgorithm) algo;
// evaulate
ec.clear();
for (final BasicData pair : this.trainingData) {
final double[] output = ralgo.computeRegression(pair.getInput());
ec.updateError(output, pair.getIdeal(), 1.0);
}