rbmatlab  1.13.10
 All Classes Namespaces Files Functions Variables Groups Pages
rb_test_estimator_parallel.m
1 function test_err = rb_test_estimator_parallel(model, ...
2  reduced_data,M_test)
3 %function test_err = rb_test_estimator(reduced_data,M_test)
4 %
5 % function determining the test-error-estimators for the given set of
6 % vectors mu (columns in M_test) of the RB simulation with corresponding
7 % RB set.
8 
9 % Bernard Haasdonk 6.6.2007
10 
11 % import model specific methods
12 %rb_simulation = model.rb_simulation;
13 
14 nmus = size(M_test,2);
15 
16 test_err = zeros(nmus,1);
17 parfor i = 1:nmus
18 
19  tmodel = model;
20  if tmodel.verbose>=5
21  fprintf('.');
22  end;
23  tmodel = tmodel.set_mu(model,M_test(:,i),true);
24  sim_data = rb_simulation(tmodel,reduced_data);
25  test_err(i) = tmodel.get_estimator_from_sim_data(sim_data);
26 
27 end;
28 fprintf('\n');
29