Skip to content

Commit 56f94e6

Browse files
committed
Fixed recent regression in nested CV
... inner CV was running over the whole data if the search() clause was used (error got introduced in previous revision of utl_nested_crossval in 3/2014).
1 parent 2a63f67 commit 56f94e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/utils/utl_nested_crossval.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
if is_needing_search(opts.argform,opts.args)
135135
% use the utl_searchmodel() meta-function as the trainer in the subsequent regular CV
136136
% with opts.opt_scheme as the (nested) search scheme
137-
opts.trainer = @(data,varargin) utl_searchmodel(data,rmfield(opts,{'eval_scheme','opt_scheme','engine_cv'}),'scheme',opts.opt_scheme);
137+
opts.trainer = @(data,varargin) utl_searchmodel(data,rmfield(opts,{'eval_scheme','opt_scheme','engine_cv','data'}),'scheme',opts.opt_scheme);
138138
end
139139

140140
% run a cross-validation, with opts.eval_scheme as the search scheme

0 commit comments

Comments
 (0)