


PRONTO job execution function
INPUT
job - harvested job data structure (see matlabbatch help)
OUTPUT
out - filename of saved data structure (1 file per group, per
subject, per modality, per condition
__________________________________________________________________________
Copyright (C) 2011 Machine Learning & Neuroimaging Laboratory

0001 function out = prt_run_cv_model(varargin) 0002 % 0003 % PRONTO job execution function 0004 % 0005 % INPUT 0006 % job - harvested job data structure (see matlabbatch help) 0007 % 0008 % OUTPUT 0009 % out - filename of saved data structure (1 file per group, per 0010 % subject, per modality, per condition 0011 %__________________________________________________________________________ 0012 % Copyright (C) 2011 Machine Learning & Neuroimaging Laboratory 0013 0014 % Written by A Marquand 0015 % $Id: prt_run_cv_model.m 298 2011-11-03 17:51:07Z schrouff $ 0016 0017 job = varargin{1}; 0018 0019 % Load PRT.mat 0020 % ------------------------------------------------------------------------- 0021 fname = char(job.infile); 0022 if exist('PRT','var') 0023 clear PRT 0024 end 0025 load(fname); 0026 0027 % ------------------------------------------------------------------------- 0028 % Input file 0029 % ------------------------------------------------------------------------- 0030 0031 in.fname = job.infile; 0032 in.model_name = job.model_name; 0033 mid = prt_init_model(PRT, in); 0034 0035 % Special cross-validation for MCKR 0036 if strcmp(PRT.model(mid).input.machine.function,'prt_machine_mckr') 0037 out=prt_cv_mckr(PRT,in); 0038 else 0039 out=prt_cv_model(PRT, in); 0040 end 0041 0042 0043 % ------------------------------------------------------------------------- 0044 % Function output 0045 % ------------------------------------------------------------------------- 0046 out=[]; %prevent warning of overwriting 'char' class 0047 disp('Model execution complete.') 0048 out.files{1} = in.fname{1}; 0049 disp('Done') 0050 0051 return