From 51c02665615188dcdef304bc059353a5b1513043 Mon Sep 17 00:00:00 2001 From: JesperLH Date: Fri, 8 Feb 2019 11:39:55 -0500 Subject: [PATCH] Also show numel(G_est) --- eusipco/visualize_exp_probTTvsOseTT.m | 30 +++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/eusipco/visualize_exp_probTTvsOseTT.m b/eusipco/visualize_exp_probTTvsOseTT.m index eb9890d..efa84ff 100644 --- a/eusipco/visualize_exp_probTTvsOseTT.m +++ b/eusipco/visualize_exp_probTTvsOseTT.m @@ -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); @@ -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,:)); @@ -30,14 +33,21 @@ 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') @@ -45,11 +55,19 @@ 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)) \ No newline at end of file +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') \ No newline at end of file