From c8ccd77dbe8990002f7a91ddbb52b51d12b089f3 Mon Sep 17 00:00:00 2001 From: "A. Gel" Date: Sun, 1 Nov 2020 22:05:08 -0700 Subject: [PATCH] =?UTF-8?q?Output=20from=20PSUADE=20for=20=20Bootstapped?= =?UTF-8?q?=20Sobols=E2=80=99=20Total=20Sensitivity=20Indices?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PSUADE generates Matlab format file as output for graphical plot of the Total Sensitivity Indices --- .../2_SensitivityAnalysis/matlabrssoboltsib.m | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Case1_ParticleSettling/DeterministicCalibration/PSUADE/2_SensitivityAnalysis/matlabrssoboltsib.m diff --git a/Case1_ParticleSettling/DeterministicCalibration/PSUADE/2_SensitivityAnalysis/matlabrssoboltsib.m b/Case1_ParticleSettling/DeterministicCalibration/PSUADE/2_SensitivityAnalysis/matlabrssoboltsib.m new file mode 100644 index 0000000..369e19f --- /dev/null +++ b/Case1_ParticleSettling/DeterministicCalibration/PSUADE/2_SensitivityAnalysis/matlabrssoboltsib.m @@ -0,0 +1,66 @@ +% This file contains total order Sobol' indices +% with error bars coming from bootstrapping. +% to select the most important ones to display, +% set sortFlag = 1 and set nn to be the number +% of inputs to display. +sortFlag = 1; +nn = 6; +Means = [ + 9.6472463413734780e-03 + 6.1485792124578746e-03 + 8.0693547559271966e-02 + 5.7352821966210346e-02 + 1.7345403191746353e-01 + 8.1644443419798363e-01 +]; +Stds = [ + 3.0970966534595817e-03 + 2.5093764647319819e-03 + 1.1085410630119624e-02 + 8.2362650062641641e-03 + 1.5043263088679606e-02 + 1.3715187366348245e-02 +]; +% Str = {'t1:P_0','t2:beta','t3:StatWeight','t4:ep_gstar','t5:VelfacCoeff','x1:InitConc'}; + Str = {'\theta_1:P_0','\theta_2:\beta','\theta_3:StatWeight','\theta_4:ep_g^*','\theta_5:VelfacCoeff','x_1:InitConc'}; +hold off +if (sortFlag == 1) + [Means, I2] = sort(Means,'descend'); + Stds = Stds(I2); + I2 = I2(1:nn); + Means = Means(1:nn); + Stds = Stds(1:nn); + Str = Str(I2); +end +ymin = min(Means-Stds); +if ymin < 0 + ymin = 0; +end; +ymax = max(Means+Stds); +h2 = 0.05 * (ymax - ymin); +bar(Means,0.8); +for ii = 1:nn + if (ii == 1) +hold on + end; + XX = [ii ii]; + YY = [Means(ii)-Stds(ii) Means(ii)+Stds(ii)]; + if YY(1) < 0 + YY(1) = 0; + end; + plot(XX,YY,'-ko','LineWidth',3.0,'MarkerEdgeColor','k','MarkerFaceColor','g','MarkerSize',12) +end; +set(gca,'linewidth',2) +set(gca,'fontweight','bold') +set(gca,'fontsize',12) +grid on +box on +axis([0 nn+1 ymin ymax]) +set(gca,'XTickLabel',[]); +th=text(1:nn, repmat(ymin-0.05*(ymax-ymin),nn,1),Str,'HorizontalAlignment','center','rotation',330); +set(th, 'fontsize', 12) +set(th, 'fontweight', 'bold') +title('Total Order Sobol Indices (with bootstrap)','FontWeight','bold','FontSize',12) +ylabel('Total Order Sobol Index (Normalized)','FontWeight','bold','FontSize',12) +hold off +print -dpng R2_rssoboltsib \ No newline at end of file -- GitLab