MATLAB: 2-D Histogram Correlation Issue

2-d histogramcorrelationMATLABsimilaritysum of squared differences

Dear all,
I have about 500 distributions and trying to find which has highest correlation, which is most similar to my reference 2-D histogram. My reference distribution;
To select the most similar distribution, I'm currently using the sum of square differences method and the result is as follows;
But the result is not satisfying at the moment. I've checked with plotting many distributions and I think the following distribution is more similar to my reference distribution. The titles are the values of sum of squared differences, smaller one should indicate the higher correlation.
Could you please advice if I'm using the correct method to find the distribution most similar to reference one? What is your recommendation?
This is how I calculate sum of squared differences;
sum(sum((map-referencemap).^2));
Thank you in advance!

Best Answer

It depends on how much you want to penalize the bin differences. The MSE will heavily penalize outliers much more than close values while the Median Absolute Difference or Mean Absolute Difference (see Wikipedia) has more of a linear weighting.