clear
load NPSVOR name={'SCV1V1','SVC1VA','SVR','CSSVC','SVMOP','NNOP','ELMOP','POM',...
'NNPOM', 'SVOREX','SVORIM','SVORIMLin','KDLOR','GPOR','REDSVM','ORBALL' }; path0={'E:\datasets-orreview\DetailedResultsREVIEW\Real\csv\',...
'E:\datasets-orreview\DetailedResultsREVIEW\Regression\csv\'}; Index{1}=[1 2 3 4 5 12 14 22 24 16 18 20 ];
Index{2}=[6 7 8 9 10 11 13 21 23 15 17 19]; j=2 %for Discreted Ordinal Regression Data
N=length(name);
alpha =0.05;
for i=1:N
fname= strcat(path0{j}, 'Results-', name{i},'.','csv');
D=importdata(fname,',');
Data=D.data;
Z5=[]; A5=[];
for k=1:12
Z5=[Z5 Data(:,(Index{1}(k)-1)*3+1 )];
A5=[A5 Data(:,(Index{1}(k)-1)*3+2 )];
end
DataZ5{i} = Z5;
DataA5{i} = A5;
end
DataZ5{N+1}=AZ5';
DataZ5{N+2}=BZ5';
DataA5{N+1}=AA5';
DataA5{N+2}=BA5';
MZE5=zeros(N+2,3);
MAE5=zeros(N+2,3); for i=1:12
A1=zeros(20,N+2);A2=zeros(20,N+2);
for j=1:N+2
A1(:,j) = DataZ5{j}(:,i);
A2(:,j) = DataA5{j}(:,i);
end
MZE5 = MZE5+Wilcoxon(A1,alpha);
MAE5 = MAE5+Wilcoxon(A2,alpha);
end j=1 %for Real Data
N=length(name);
for i=1:N
fname= strcat(path0{j}, 'Results-', name{i},'.','csv');
D=importdata(fname,',');
Data=D.data;
Zr=[]; Ar=[];
for k=1:17
Zr=[Zr Data(:,(k-1)*3+1 )];
Ar=[Ar Data(:,(k-1)*3+2 )];
end
DataZr{i} = Zr;
DataAr{i} = Ar;
end
DataZr{N+1}=AZr';
DataZr{N+2}=BZr';
DataAr{N+1}=AAr';
DataAr{N+2}=BAr';
MZEr=zeros(N+2,3);
MAEr=zeros(N+2,3); for i=1:17
A1=zeros(30,N+2);A2=zeros(30,N+2);
for j=1:N+2
A1(:,j) = DataZr{j}(:,i);
A2(:,j) = DataAr{j}(:,i);
end
MZEr = MZEr+Wilcoxon(A1,alpha);
MAEr= MAEr+Wilcoxon(A2,alpha);
end MZE=[MZE5 MZEr];MAE= [MAE5 MAEr]; %final result of average rank
function f = Wilcoxon(A,alpha)
m=size(A,2);
Sig=zeros(m,m);
for i=1:m
for j=i:m
x=A(:,i);
y=A(:,j);
[p,h,stats]=signrank(x,y,'alpha',alpha);
% Sig(ni,ai)=stats.signedrank;
if mean(x)<mean(y) && h==1
Sig(i,j)=1;
elseif mean(x)>mean(y) && h==1
Sig(i,j)=-1;
else
Sig(i,j)=0;
end
end
end X=Sig-Sig';
f=[sum(X==1,2) sum(X==0,2)-1 sum(X==-1,2)]; end