Account for NaN in graphs during identification if ML is used
parent
d09bf195c9
commit
01cb238a22
|
@ -56,14 +56,22 @@ if SampleSize == 1,
|
||||||
subplot(211)
|
subplot(211)
|
||||||
mmm = (idehess.ide_strength_J);
|
mmm = (idehess.ide_strength_J);
|
||||||
[ss, is] = sort(mmm);
|
[ss, is] = sort(mmm);
|
||||||
bar(log([idehess.ide_strength_J(:,is)' idehess.ide_strength_J_prior(:,is)']))
|
if ~all(isnan(idehess.ide_strength_J_prior))
|
||||||
|
bar(log([idehess.ide_strength_J(:,is)' idehess.ide_strength_J_prior(:,is)']))
|
||||||
|
else
|
||||||
|
bar(log([idehess.ide_strength_J(:,is)' ]))
|
||||||
|
end
|
||||||
set(gca,'xlim',[0 nparam+1])
|
set(gca,'xlim',[0 nparam+1])
|
||||||
set(gca,'xticklabel','')
|
set(gca,'xticklabel','')
|
||||||
dy = get(gca,'ylim');
|
dy = get(gca,'ylim');
|
||||||
for ip=1:nparam,
|
for ip=1:nparam,
|
||||||
text(ip,dy(1),name{is(ip)},'rotation',90,'HorizontalAlignment','right','interpreter','none')
|
text(ip,dy(1),name{is(ip)},'rotation',90,'HorizontalAlignment','right','interpreter','none')
|
||||||
end
|
end
|
||||||
legend('relative to param value','relative to prior std','Location','Best')
|
if ~all(isnan(idehess.ide_strength_J_prior))
|
||||||
|
legend('relative to param value','relative to prior std','Location','Best')
|
||||||
|
else
|
||||||
|
legend('relative to param value','Location','Best')
|
||||||
|
end
|
||||||
if idehess.flag_score,
|
if idehess.flag_score,
|
||||||
title('Identification strength with asymptotic Information matrix (log-scale)')
|
title('Identification strength with asymptotic Information matrix (log-scale)')
|
||||||
else
|
else
|
||||||
|
@ -71,14 +79,23 @@ if SampleSize == 1,
|
||||||
end
|
end
|
||||||
|
|
||||||
subplot(212)
|
subplot(212)
|
||||||
bar(log([idehess.deltaM(is) idehess.deltaM_prior(is)]))
|
if ~all(isnan(idehess.deltaM_prior))
|
||||||
|
bar(log([idehess.deltaM(is) idehess.deltaM_prior(is)]))
|
||||||
|
else
|
||||||
|
bar(log([idehess.deltaM(is)]))
|
||||||
|
end
|
||||||
|
|
||||||
set(gca,'xlim',[0 nparam+1])
|
set(gca,'xlim',[0 nparam+1])
|
||||||
set(gca,'xticklabel','')
|
set(gca,'xticklabel','')
|
||||||
dy = get(gca,'ylim');
|
dy = get(gca,'ylim');
|
||||||
for ip=1:nparam,
|
for ip=1:nparam,
|
||||||
text(ip,dy(1),name{is(ip)},'rotation',90,'HorizontalAlignment','right','interpreter','none')
|
text(ip,dy(1),name{is(ip)},'rotation',90,'HorizontalAlignment','right','interpreter','none')
|
||||||
end
|
end
|
||||||
legend('relative to param value','relative to prior std','Location','Best')
|
if ~all(isnan(idehess.deltaM_prior))
|
||||||
|
legend('relative to param value','relative to prior std','Location','Best')
|
||||||
|
else
|
||||||
|
legend('relative to param value','Location','Best')
|
||||||
|
end
|
||||||
if idehess.flag_score,
|
if idehess.flag_score,
|
||||||
title('Sensitivity component with asymptotic Information matrix (log-scale)')
|
title('Sensitivity component with asymptotic Information matrix (log-scale)')
|
||||||
else
|
else
|
||||||
|
@ -91,27 +108,30 @@ if SampleSize == 1,
|
||||||
skipline()
|
skipline()
|
||||||
disp('Press ENTER to plot advanced diagnostics'), pause(5),
|
disp('Press ENTER to plot advanced diagnostics'), pause(5),
|
||||||
end
|
end
|
||||||
hh = dyn_figure(options_,'Name',[tittxt, ' - Sensitivity plot']);
|
if all(isnan([siJnorm';siHnorm';siLREnorm']))
|
||||||
subplot(211)
|
fprintf('\nIDENTIFICATION: Skipping sensitivity plot, because standard deviation of parameters is NaN, possibly due to the use of ML.\n')
|
||||||
mmm = (siJnorm)'./max(siJnorm);
|
else
|
||||||
mmm1 = (siHnorm)'./max(siHnorm);
|
hh = dyn_figure(options_,'Name',[tittxt, ' - Sensitivity plot']);
|
||||||
mmm=[mmm mmm1];
|
subplot(211)
|
||||||
mmm1 = (siLREnorm)'./max(siLREnorm);
|
mmm = (siJnorm)'./max(siJnorm);
|
||||||
offset=length(siHnorm)-length(siLREnorm);
|
mmm1 = (siHnorm)'./max(siHnorm);
|
||||||
mmm1 = [NaN(offset,1); mmm1];
|
mmm=[mmm mmm1];
|
||||||
mmm=[mmm mmm1];
|
mmm1 = (siLREnorm)'./max(siLREnorm);
|
||||||
|
offset=length(siHnorm)-length(siLREnorm);
|
||||||
bar(log(mmm(is,:).*100))
|
mmm1 = [NaN(offset,1); mmm1];
|
||||||
set(gca,'xlim',[0 nparam+1])
|
mmm=[mmm mmm1];
|
||||||
set(gca,'xticklabel','')
|
|
||||||
dy = get(gca,'ylim');
|
bar(log(mmm(is,:).*100))
|
||||||
for ip=1:nparam,
|
set(gca,'xlim',[0 nparam+1])
|
||||||
text(ip,dy(1),name{is(ip)},'rotation',90,'HorizontalAlignment','right','interpreter','none')
|
set(gca,'xticklabel','')
|
||||||
|
dy = get(gca,'ylim');
|
||||||
|
for ip=1:nparam,
|
||||||
|
text(ip,dy(1),name{is(ip)},'rotation',90,'HorizontalAlignment','right','interpreter','none')
|
||||||
|
end
|
||||||
|
legend('Moments','Model','LRE model','Location','Best')
|
||||||
|
title('Sensitivity bars using derivatives (log-scale)')
|
||||||
|
dyn_saveas(hh,[IdentifDirectoryName '/' M_.fname '_sensitivity_' tittxt1 ],options_);
|
||||||
end
|
end
|
||||||
legend('Moments','Model','LRE model','Location','Best')
|
|
||||||
title('Sensitivity bars using derivatives (log-scale)')
|
|
||||||
dyn_saveas(hh,[IdentifDirectoryName '/' M_.fname '_sensitivity_' tittxt1 ],options_);
|
|
||||||
|
|
||||||
% identificaton patterns
|
% identificaton patterns
|
||||||
for j=1:size(idemoments.cosnJ,2),
|
for j=1:size(idemoments.cosnJ,2),
|
||||||
pax=NaN(nparam,nparam);
|
pax=NaN(nparam,nparam);
|
||||||
|
|
Loading…
Reference in New Issue