1 % script
for generating the MCMDS basis generation images
3 % Bernard Haasdonk 22.2.2010
5 % a adaptive training
set extension:
6 step = 1; % generate different bases
7 % step = 2; % generate images overfitting*_small.eps
8 % step = 3; % generate diagrams of training runtimes and errors
9 % step = 4; % generate diagrams of test errors and error ratios
10 % step = 5; % generate diagrams of max test errors
14 disp(
'to be implemented!!');
17 load([
'C:\Dokumente und Einstellungen\Bernard\Eigene Dateien\',...
18 'TempMatlab\
basisgen\RB_uniform_fixed_64.mat
']);
19 params.num_plot_intervals = [40,40];
20 offline_data = rb_offline_prep(detailed_data,params);
21 params.N = size(detailed_data.RB,2);
22 online_data = rb_online_prep(offline_data,params);
24 plot_error_estimator(online_data,params);
25 c = get(gca,'Children
');
26 cdata = get(c(end),'Cdata
');
28 set(c(end),'Cdata
',cdata);
29 set(gca,'Clim
',[-8,-7]);
30 title('log_{10}(\Delta(\mu))
');
34 par.numintervals = params.RB_numintervals;
35 par.range = params.mu_ranges;
37 pgrid = cubegrid(par);
41 load(['C:\Dokumente und Einstellungen\Bernard\Eigene Dateien\
',...
42 'TempMatlab\
basisgen\RB_uniform_refined_2_2_r1.mat
']);
43 params.num_plot_intervals = [40,40];
44 offline_data = rb_offline_prep(detailed_data,params);
45 params.N = size(detailed_data.RB,2);
46 online_data = rb_online_prep(offline_data,params);
48 plot_error_estimator(online_data,params);
49 c = get(gca,'Children
');
50 cdata = get(c(end),'Cdata
');
52 set(c(end),'Cdata
',cdata);
53 set(gca,'Clim
',[-8,-7]);
54 title('log_{10}(\Delta(\mu))
');
58 params.color = [0,0,0];
59 plot(detailed_data.RB_info.MMesh_list{end},params);
60 %CLIM : 2.07876e-008 7.30869e-008
63 load(['C:\Dokumente und Einstellungen\Bernard\Eigene Dateien\
',...
64 'TempMatlab\
basisgen\RB_adaptive_refined_2_2_r1_smax1000.mat
']);
65 params.num_plot_intervals = [40,40];
66 offline_data = rb_offline_prep(detailed_data,params);
67 params.N = size(detailed_data.RB,2);
68 online_data = rb_online_prep(offline_data,params);
70 plot_error_estimator(online_data,params);
71 c = get(gca,'Children
');
72 cdata = get(c(end),'Cdata
');
74 set(c(end),'Cdata
',cdata);
75 set(gca,'Clim
',[-8,-7]);
76 title('log_{10}(\Delta(\mu))
');
80 params.color = [0,0,0];
81 plot(detailed_data.RB_info.MMesh_list{end},params);
83 case 3 % runtime diagrams
85 %%%%% run basisgen_main with the following settings in the header:
87 %test_RB_methods = {...
88 % 'RB_uniform_refined_2_2_r1
',...
89 % 'RB_uniform_refined_2_2_r5
',...
90 % 'RB_uniform_fixed_64
',...
91 % 'RB_uniform_fixed_256
',...
92 % 'RB_uniform_refined_2_2_r1
',...
93 % 'RB_uniform_refined_2_2_r5
',...
94 % 'RB_adaptive_refined_2_2_r1_smax1000_theta5e-2
',...
95 % 'RB_adaptive_refined_2_2_r5_smax1000_theta5e-2
',...
96 % 'RB_adaptive_refined_2_2_r1_smax1000_theta1e-1
',...
97 % 'RB_adaptive_refined_2_2_r5_smax1000_theta1e-1
',...
99 % test_RB_indicators = {'estimator
'}; % only estimators
100 % compute_RB_methods = test_RB_methods;
102 %%%%%% then perform the following on the generated files for getting
106 % 'RB_uniform_refined_2_2_r1_tested
',...
107 % 'RB_uniform_fixed_256_tested
',...
108 % 'RB_adaptive_refined_2_2_r1_smax1000_theta5e-2_tested
'};
111 % uniform-refined approaches nur bis t=3600:
112 fns = {'RB_uniform_refined_p3_i2_r1_tested
',...
113 'RB_uniform_refined_p3_i3_r1_tested
',...
114 'RB_adaptive_refined_p3_i2_r1_smax1000_theta5e-2_tested
',...
115 'RB_adaptive_refined_p3_i3_r1_smax1000_theta5e-2_tested
',...
116 'RB_uniform_fixed_p3_64_tested
',...
117 'RB_uniform_fixed_p3_125_tested
',...
120 params.plot_train_times = 1;
121 params.plot_train_estimators = 0;
122 params.plot_test_estimators = 0;
123 params.plot_test_errors = 0;
124 params.plot_linestyles = {'-
','-.
','-
','-.
','-
','-.
'};
125 params.plot_linecolors = {'r
','r
',[0,0.6,0],[0,0.6,0],'b
','b
'};
126 params.plot_linewidths = [2,2,2,2,2,2];
127 params.plot_legends_location = 'Northwest
';
128 params.plot_legends = {'uniform-refined 2^3
',...
129 'uniform-refined 3^3
',...
130 'adaptive-refined 2^3
',...
131 'adaptive-refined 3^3
',...
132 'uniform-fixed 4^3
',...
133 'uniform-fixed 5^3
'};
135 plot_basisgen_results(fns,params);
137 % uniform-refined approaches jetzt ohne timeout:
138 fns = {'RB_uniform_refined_p3_i2_r1_notimeout_tested
',...
139 'RB_uniform_refined_p3_i3_r1_notimeout_tested
',...
140 'RB_adaptive_refined_p3_i2_r1_smax1000_theta5e-2_tested
',...
141 'RB_adaptive_refined_p3_i3_r1_smax1000_theta5e-2_notimeout_tested
',...
142 'RB_uniform_fixed_p3_64_tested
',...
143 'RB_uniform_fixed_p3_125_tested
'};
144 %'RB_uniform_fixed_p3_216_notimeout_tested
',...
146 params.plot_train_times = 0;
147 params.plot_train_estimators = 1;
148 params.plot_test_estimators = 0;
149 params.plot_test_errors = 0;
150 params.plot_legends_location = 'NorthEast
';
151 plot_basisgen_results(fns,params);
153 % => Speichern der Bilder als
154 % computation_times.eps und
159 %%%%% run basisgen_main with the following settings in the header:
161 %test_RB_methods = {...
162 % 'RB_uniform_refined_2_2_r1
',...
163 % 'RB_uniform_refined_2_2_r5
',...
164 % 'RB_uniform_fixed_64
',...
165 % 'RB_uniform_fixed_256
',...
166 % 'RB_uniform_refined_2_2_r1
',...
167 % 'RB_uniform_refined_2_2_r5
',...
168 % 'RB_adaptive_refined_2_2_r1_smax1000_theta5e-2
',...
169 % 'RB_adaptive_refined_2_2_r5_smax1000_theta5e-2
',...
170 % 'RB_adaptive_refined_2_2_r1_smax1000_theta1e-1
',...
171 % 'RB_adaptive_refined_2_2_r5_smax1000_theta1e-1
',...
173 % test_RB_indicators = {'estimator
'}; % only estimators
174 % compute_RB_methods = test_RB_methods;
176 %%%%%% then perform the following on the generated files for getting
180 % 'RB_uniform_refined_2_2_r1_tested
',...
181 % 'RB_uniform_fixed_256_tested
',...
182 % 'RB_adaptive_refined_2_2_r1_smax1000_theta5e-2_tested
'};
184 % uniform-refined approaches jetzt ohne timeout:
185 fns = {'RB_uniform_refined_p3_i2_r1_notimeout_tested
',...
186 'RB_uniform_refined_p3_i3_r1_notimeout_tested
',...
187 'RB_adaptive_refined_p3_i2_r1_smax1000_theta5e-2_tested
',...
188 'RB_adaptive_refined_p3_i3_r1_smax1000_theta5e-2_notimeout_tested
',...
189 'RB_uniform_fixed_p3_64_tested
',...
190 'RB_uniform_fixed_p3_125_tested
'};
191 %'RB_uniform_fixed_p3_216_notimeout_tested
',...
193 params.plot_train_times = 0;
194 params.plot_train_estimators = 0;
195 params.plot_test_estimators = 1;
196 params.plot_test_errors = 1;
197 params.plot_linestyles = {'-
','-.
','-
','-.
','-
','-.
'};
198 params.plot_linecolors = {'r
','r
',[0,0.6,0],[0,0.6,0],'b
','b
'};
199 params.plot_linewidths = [2,2,2,2,2,2];
200 params.plot_legends_location = 'North
';
201 params.plot_legends = {'uniform-refined 2^3
',...
202 'uniform-refined 3^3
',...
203 'adaptive-refined 2^3
',...
204 'adaptive-refined 3^3
',...
205 'uniform-fixed 4^3
',...
206 'uniform-fixed 5^3
'};
208 plot_basisgen_results(fns,params);
212 params.plot_legends_location = 'NorthWest
';
213 plot_basisgen_results(fns,params);
217 % => Manuelles Speichern der Bilder als
218 % test_errors.eps und
219 % test_error_ratio.eps
223 fns = {'RB_uniform_refined_p3_i2_r1_notimeout_tested
',...
224 'RB_uniform_refined_p3_i3_r1_notimeout_tested
',...
225 'RB_adaptive_refined_p3_i2_r1_smax1000_theta5e-2_tested
',...
226 'RB_adaptive_refined_p3_i3_r1_smax1000_theta5e-2_notimeout_tested
',...
227 'RB_uniform_fixed_p3_64_tested
',...
228 'RB_uniform_fixed_p3_125_tested
'};
229 %'RB_uniform_fixed_p3_216_notimeout_tested
',...
231 params.plot_train_times = 0;
232 params.plot_train_estimators = 0;
233 params.plot_test_estimators = 1;
234 params.plot_test_errors = 0;
235 params.plot_max_test_vs_time = 1;
236 params.plot_linestyles = {'-
','-.
','-
','-.
','-
','-.
'};
237 params.plot_linecolors = {'r
','r
',[0,0.6,0],[0,0.6,0],'b
','b
'};
238 params.plot_linewidths = [2,2,2,2,2,2];
239 params.plot_legends_location = 'NorthEast
';
240 params.plot_legends = {'uniform-refined 2^3
',...
241 'uniform-refined 3^3
',...
242 'adaptive-refined 2^3
',...
243 'adaptive-refined 3^3
',...
244 'uniform-fixed 4^3
',...
245 'uniform-fixed 5^3
'};
247 plot_basisgen_results(fns,params);
251 set(gca,'Xlim
',[0,3600]);
252 set(gca,'Ylim
',[1e-7,2e-4]);