-
Notifications
You must be signed in to change notification settings - Fork 1
/
Table2_Po
177 lines (159 loc) · 6.8 KB
/
Table2_Po
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Synthetic Evaluation of NEBEAE with different initializations for Po
%
% DUCD
% June/2022
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sSNR=[20 25 30 35 40]; %% Test with 50, 52.5, 55 y 57.5 dB
pPSNR=[20 25 30 35 40];
Nsamples=60;
n=4;
ModelType=5;
Rep=50;
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Define Paremeters of NEBEAE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
initcond=6; % Initial condition of end-members matrix
rho=0.1; % Similarity weight in end-members estimation
lambda=0.1; % Entropy weight for abundance estimation
epsilon=1e-3;
maxiter=50;
parallel=0;
normalization=1;
downsampling=0.25; % Downsampling in end-members estimation
disp_iter=0; % Display partial performance in BEAE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Initialize Performance Metrics
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ResultsYh=zeros(3,4,Rep);
ResultsAh=zeros(3,4,Rep);
ResultsPh=zeros(3,4,Rep);
ResultsPh2=zeros(3,4,Rep);
ResultsTh=zeros(3,4,Rep);
for index=1:length(sSNR)
SNR=sSNR(index);
PSNR=pPSNR(index);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Execute Blind Estimation Methodologies
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%');
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%');
disp('Synthetic VNIR Datasets');
disp('Blind Unmixing Estimation');
disp(['SNR =' num2str(SNR) ' dB']);
disp(['PSNR =' num2str(PSNR) ' dB']);
disp(['Number of end-members=' num2str(n)]);
for j=1:Rep
[Z,Po,Ao,Go]=VNIRsynth2(n,Nsamples,SNR,PSNR,ModelType);
[L,K]=size(Z);
Y=Z;
disp(['Iteration=' num2str(j)]);
tic;
disp('%%%%%%%%%%%%%%%%%%');
disp('NEBEAE --> NFINDR');
paramvec=[5,rho,lambda,epsilon,maxiter,downsampling,parallel,disp_iter];
[P,A,D,G,Zh]=NEBEAE2(Z,n,paramvec);
Tnbeae1=toc;
ResultsYh(index,1,j)=norm(Zh-Z,'fro')/norm(Z,'fro');
ResultsAh(index,1,j)=errorabundances(Ao,(A.*repmat(G',[n,1])));
ResultsPh(index,1,j)=errorendmembers(Po,P);
ResultsPh2(index,1,j)=errorSAM(Po,P);
ResultsTh(index,1,j)=Tnbeae1;
tic;
disp('%%%%%%%%%%%%%%%%%%');
disp('NEBEAE --> VCA');
paramvec=[6,rho,lambda,epsilon,maxiter,downsampling,parallel,disp_iter];
[P,A,D,G,Zh]=NEBEAE2(Z,n,paramvec);
Tnbeae2=toc;
ResultsYh(index,2,j)=norm(Zh-Z,'fro')/norm(Z,'fro');
ResultsAh(index,2,j)=errorabundances(Ao,(A.*repmat(G',[n,1])));
ResultsPh(index,2,j)=errorendmembers(Po,P);
ResultsPh2(index,2,j)=errorSAM(Po,P);
ResultsTh(index,2,j)=Tnbeae2;
%%
tic;
disp('%%%%%%%%%%%%%%%%%%');
disp('NEBEAE --> SVMAX');
paramvec=[7,rho,lambda,epsilon,maxiter,downsampling,parallel,disp_iter];
[P,A,D,G,Zh]=NEBEAE2(Z,n,paramvec);
Tnbeae3=toc;
ResultsYh(index,3,j)=norm(Zh-Z,'fro')/norm(Z,'fro');
ResultsAh(index,3,j)=errorabundances(Ao,(A.*repmat(G',[n,1])));
ResultsPh(index,3,j)=errorendmembers(Po,P);
ResultsPh2(index,3,j)=errorSAM(Po,P);
ResultsTh(index,3,j)=Tnbeae3;
%%
tic;
disp('%%%%%%%%%%%%%%%%%%');
disp('NEBEAE --> SISAL');
paramvec=[8,rho,lambda,epsilon,maxiter,downsampling,parallel,disp_iter];
[P,A,D,G,Zh]=NEBEAE2(Z,n,paramvec);
Tnbeae4=toc;
ResultsYh(index,4,j)=norm(Zh-Z,'fro')/norm(Z,'fro');
ResultsAh(index,4,j)=errorabundances(Ao,(A.*repmat(G',[n,1])));
ResultsPh(index,4,j)=errorendmembers(Po,P);
ResultsPh2(index,4,j)=errorSAM(Po,P);
ResultsTh(index,4,j)=Tnbeae4;
%%
end
end
%%
AAnd=[' & ';' & ';' & ';' & '; ' & '];
PM=[' $\pm$ '; ' $\pm$ '; ' $\pm$ '; ' $\pm$ '; ' $\pm$ '];
EEnd=[' \\'; ' \\'; ' \\'; ' \\'; ' \\'];
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%');
disp('Mean Responses in Performance Metrics')
disp('SNR/PSNR NFINDR VCA SVMAX SISAL');
disp('%%%%%%%%%%%%%%%');
disp('Error in Output Estimation (%)');
disp([num2str(int8(sSNR')) AAnd num2str(mean(ResultsYh(:,1,:),3)) PM num2str(std(ResultsYh(:,1,:),[],3)) ...
AAnd num2str(mean(ResultsYh(:,2,:),3)) PM num2str(std(ResultsYh(:,2,:),[],3)) ...
AAnd num2str(mean(ResultsYh(:,3,:),3)) PM num2str(std(ResultsYh(:,3,:),[],3)) ...
AAnd num2str(mean(ResultsYh(:,4,:),3)) PM num2str(std(ResultsYh(:,4,:),[],3)) EEnd]);
disp('%%%%%%%%%%%%%%%');
disp('Error in Abundance Estimation (%)');
disp([num2str(int8(sSNR')) AAnd num2str(mean(ResultsAh(:,1,:),3)) PM num2str(std(ResultsAh(:,1,:),[],3)) ...
AAnd num2str(mean(ResultsAh(:,2,:),3)) PM num2str(std(ResultsAh(:,2,:),[],3)) ...
AAnd num2str(mean(ResultsAh(:,3,:),3)) PM num2str(std(ResultsAh(:,3,:),[],3)) ...
AAnd num2str(mean(ResultsAh(:,4,:),3)) PM num2str(std(ResultsAh(:,4,:),[],3)) EEnd]);
disp('%%%%%%%%%%%%%%%');
disp('Error in End-member Estimation');
disp([num2str(int8(sSNR')) AAnd num2str(mean(ResultsPh(:,1,:),3)) PM num2str(std(ResultsPh(:,1,:),[],3)) ...
AAnd num2str(mean(ResultsPh(:,2,:),3)) PM num2str(std(ResultsPh(:,2,:),[],3)) ...
AAnd num2str(mean(ResultsPh(:,3,:),3)) PM num2str(std(ResultsPh(:,3,:),[],3)) ...
AAnd num2str(mean(ResultsPh(:,4,:),3)) PM num2str(std(ResultsPh(:,4,:),[],3)) EEnd]);
disp('%%%%%%%%%%%%%%%');
disp('Error in End-member Estimation (SAM)');
disp([num2str(int8(sSNR')) AAnd num2str(mean(ResultsPh2(:,1,:),3)) PM num2str(std(ResultsPh2(:,1,:),[],3)) ...
AAnd num2str(mean(ResultsPh2(:,2,:),3)) PM num2str(std(ResultsPh2(:,2,:),[],3)) ...
AAnd num2str(mean(ResultsPh2(:,3,:),3)) PM num2str(std(ResultsPh2(:,3,:),[],3)) ...
AAnd num2str(mean(ResultsPh2(:,4,:),3)) PM num2str(std(ResultsPh2(:,4,:),[],3)) EEnd]);
disp('%%%%%%%%%%%%%%%');
disp('Error in Computation Time');
disp([num2str(int8(sSNR')) AAnd num2str(mean(ResultsTh(:,1,:),3)) PM num2str(std(ResultsTh(:,1,:),[],3)) ...
AAnd num2str(mean(ResultsTh(:,2,:),3)) PM num2str(std(ResultsTh(:,2,:),[],3)) ...
AAnd num2str(mean(ResultsTh(:,3,:),3)) PM num2str(std(ResultsTh(:,3,:),[],3)) ...
AAnd num2str(mean(ResultsTh(:,4,:),3)) PM num2str(std(ResultsTh(:,4,:),[],3)) EEnd]);
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ANOVA Analysis
TabAnova=zeros(length(sSNR),4);
for j=1:5
for index=1:length(sSNR)
if j==1
TabAnova(index,j)=anova1(squeeze(ResultsYh(index,:,:))',[],'off');
elseif j==2
TabAnova(index,j)=anova1(squeeze(ResultsAh(index,:,:))',[],'off');
elseif j==3
TabAnova(index,j)=anova1(squeeze(ResultsPh(index,:,:))',[],'off');
elseif j==4
TabAnova(index,j)=anova1(squeeze(ResultsPh2(index,:,:))',[],'off');
else
TabAnova(index,j)=anova1(squeeze(ResultsTh(index,:,:))',[],'off');
end
end
end
display(TabAnova)