Skip to content
Snippets Groups Projects
Commit 0534e80b authored by Vojtech Moravec's avatar Vojtech Moravec
Browse files

Calculate MSE from it difference array,

parent f054631c
No related branches found
No related tags found
No related merge requests found
......@@ -77,4 +77,12 @@ public class Utils {
}
public static double calculateMse(final int[] difference) {
double sum = 0.0;
for (final int val : difference) {
sum += Math.pow(val, 2);
}
final double mse = (sum / (double) difference.length);
return mse;
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment