Still want to join the ari in addition, the calculation of nmi, figuring out what the acc is the first step
Everyone know to share ~
Function [miss1, index]=missclassGroups (Segmentation, RefSegmentation ngroups)
If (size (RefSegmentation, 2)==1)
RefSegmentation=RefSegmentation ';
End
If (size (Segmentation, 2)==1)
Segmentation=Segmentation '; % all become row vector
End
Permutations=perms (1: ngroups);
Miss=zeros (size (Permutations, 1), size (Segmentation, 1));
For k=1: size (Segmentation, 1) % is actually only a layer of loop k=1
For j=1: size (Permutations, 1)
Miss (j, k)=sum (abs (Segmentation (k, :) - Permutations (j, RefSegmentation)) & gt; 0.1);
% Permutations (j, RefSegmentation) like RefSeg dimension is equal to the number of samples
% for the first j a full arrangement, according to the RefSeg (real value), the order of the order to withdraw from the Permutations (try Permutations (1,,5,0 [1]))
% why ACC??
% is presupposed take absolute value & gt; 0.1 to judge independence idx and this arrangement out 640 predicted (a line of comments on whether the same, different is 1
% sum for the second line comments is not the same as the number of, the higher the worse
End
End