@@ -0,0 +1,981 @@
+package io.sigpipe.sing.stat;%0A%0Aimport java.util.List;%0A%0Aimport org.apache.commons.math3.util.FastMath;%0A%0Aimport io.sigpipe.sing.dataset.feature.Feature;%0A%0Apublic class SquaredError %7B%0A%0A    private RunningStatistics sqErrs = new RunningStatistics();%0A    private RunningStatistics actualStats = new RunningStatistics();%0A    private RunningStatistics predictedStats = new RunningStatistics();%0A%0A    public SquaredError(List%3CFeature%3E actual, List%3CFeature%3E predicted) %7B%0A        if (actual.size() != predicted.size()) %7B%0A            throw new IllegalArgumentException(%0A                    %22List sizes must be equal%22);%0A        %7D%0A%0A        for (int i = 0; i %3C actual.size(); ++i) %7B%0A            Feature a = actual.get(i);%0A            Feature b = predicted.get(i);%0A            Feature err = a.subtract(b);%0A            double p = Math.pow(err.getDouble(), 2.0);%0A%0A            sqErrs.put(p);%0A            actualStats.put(a.getDouble());%0A            predictedStats.put(b.getDouble());%0A        %7D%0A    %7D%0A%7D%0A

Add class to manage squared errors between collections