2 %Mohammad Soleymani Imperial College London, 2013
3 %m.soleymani@imperial.ac.uk
6 %This
function gives you pearson, Kendall tau ranking correlation, linear
8 %it is assumed that the labels (estimated and correct) are numeric
10 % labels: the esimated labels
11 % groundTruth: ground truth (correct labels)
13 %evals : the structure with all the outputs mentioned above
16 groundTruth = groundTruth(:);
17 [r p]= corr([groundTruth labels]);
19 evals.p_pearson = p(2,1);
20 [r,p] = corr([groundTruth labels],
'type',
'Spearman');
23 evals.MSE_avg = mean((groundTruth-labels).^2);
24 evals.RMSE = sqrt(mean((groundTruth-labels).^2));
25 evals.MSE_std = std((groundTruth-labels).^2);
26 evals.MAE = mean(abs(groundTruth-labels));