Skip to content

Commit

Permalink
Also show numel(G_est)
Browse files Browse the repository at this point in the history
  • Loading branch information
JesperLH committed Feb 8, 2019
1 parent 2792aaf commit 51c0266
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions eusipco/visualize_exp_probTTvsOseTT.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
line_colors = ones(length(name_methods),3).*(1-(0.3+0.7*(length(name_methods):-1:1)/length(name_methods)))';
line_colors(end-1:end,:) = [0.9,0,0; 0, 0.1, 1];
%
for i = 1:2
for i = 1:3

figure('Position',[100*(i)^3,500,500,300])
h_plot = cell(length(name_methods),1);
Expand All @@ -17,6 +17,9 @@
elseif i==2
y = all_rmse_true;
title('Reconstruction error compared to noiseless data')
elseif i==3
y = all_numel;
title('TensorTrain Size vs Noise Level')
end
if j < length(name_methods)-1
h_plot{j} = plot(y(:,j), 'Color', line_colors(j,:));
Expand All @@ -30,26 +33,41 @@
end

hold off
set(gca,'YScale','log')
if i == 3
%pass
ylabel('Elements in the TensorTrain')
ylim([0,nanmax(all_numel(:))])
else
set(gca,'YScale','log')
ylabel('log(RMSE)')
end
set(gca,'XTick',1:2:length(snr_list), 'XTickLabel',snr_list(1:2:end))
xlabel('Signal to noise ratio (SNR) in dB')
if i == 2
if any(i == [2,3])
i_leg = [1,16,17,18];
legend([h_plot{i_leg}], name_methods(i_leg),'Location','southwest')
end
ylabel('log(RMSE)')

axis tight
if i == 1
print('./eusipco/results/probTTvsOseTT_noise','-dpng')
print('./eusipco/results/probTTvsOseTT_noise','-depsc')
elseif i == 2
print('./eusipco/results/probTTvsOseTT_nonoise','-dpng')
print('./eusipco/results/probTTvsOseTT_nonoise','-depsc')
elseif i == 3
print('./eusipco/results/probTTvsOseTT_numel','-dpng')
print('./eusipco/results/probTTvsOseTT_numel','-depsc')
end
end


%%
return

figure, plot(1:25, all_tt_comp(:,end-1), '-or', 1:25, all_tt_comp(:,end), '-xb')
legend(name_methods(end-1:end))
legend(name_methods(end-1:end))

%%
figure; plot(all_numel)
set(gca,'XTick',1:2:length(snr_list), 'XTickLabel',snr_list(1:2:end))
xlabel('Signal to noise ratio (SNR) in dB')

0 comments on commit 51c0266

Please sign in to comment.