0001 function cv_model = prt_cfg_cv_model
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 infile = cfg_files;
0013 infile.tag = 'infile';
0014 infile.name = 'Load PRT.mat';
0015 infile.filter = 'mat';
0016 infile.num = [1 1];
0017 infile.help = {'Select PRT.mat (file containing data/design structure).'};
0018
0019
0020
0021
0022 model_name = cfg_entry;
0023 model_name.tag = 'model_name';
0024 model_name.name = 'Model name';
0025 model_name.help = {'Name of a model. Must match your entry in the '...
0026 '''Specify model'' batch module.'};
0027 model_name.strtype = 's';
0028 model_name.num = [1 Inf];
0029
0030
0031
0032
0033 cv_model = cfg_exbranch;
0034 cv_model.tag = 'cv_model';
0035 cv_model.name = 'Run model';
0036 cv_model.val = {infile model_name};
0037 cv_model.help = {...
0038 ['Trains and tests the predictive machine using the cross-validation ',...
0039 'structure specified by the model.']};
0040 cv_model.prog = @prt_run_cv_model;
0041 cv_model.vout = @vout_data;
0042
0043
0044 function cdep = vout_data(job)
0045
0046
0047 cdep(1) = cfg_dep;
0048 cdep(1).sname = 'PRT.mat file';
0049 cdep(1).src_output = substruct('.','files');
0050 cdep(1).tgt_spec = cfg_findspec({{'filter','mat','strtype','e'}});
0051