rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
rb_test_estimator.m
1 function test_err = rb_test_estimator(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 for i = 1:nmus
18 
19  model = set_mu(model,M_test(:,i));
20  sim_data = rb_simulation(model,reduced_data);
21  test_err(i) = model.get_estimator_from_sim_data(sim_data);
22 
23 end;
24 fprintf('\n');
25