Home > batch > prt_cfg_weights.m

prt_cfg_weights

PURPOSE ^

Preprocessing of the data.

SYNOPSIS ^

function weights = prt_cfg_weights

DESCRIPTION ^

 Preprocessing of the data.
_______________________________________________________________________
 Copyright (C) 2011 Machine Learning & Neuroimaging Laboratory

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function weights = prt_cfg_weights
0002 % Preprocessing of the data.
0003 %_______________________________________________________________________
0004 % Copyright (C) 2011 Machine Learning & Neuroimaging Laboratory
0005 
0006 % Written by M.J.Rosa
0007 % $Id: prt_cfg_weights.m 502 2012-04-06 16:09:37Z cphillip $
0008 
0009 % ---------------------------------------------------------------------
0010 % filename Filename(s) of data
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/models ',...
0018                  'structure).']};
0019 
0020 % ---------------------------------------------------------------------
0021 % model_name Feature set name
0022 % ---------------------------------------------------------------------
0023 model_name         = cfg_entry;
0024 model_name.tag     = 'model_name';
0025 model_name.name    = 'Model name';
0026 model_name.help    = {'Name of a model. Must correspond with one ' ...
0027                       'specified in ''Run model'' and ''Specify model'''...
0028                       'batch modules.' };
0029 model_name.strtype = 's';
0030 model_name.num     = [1 Inf];
0031 
0032 % ---------------------------------------------------------------------
0033 % img_name Feature set name
0034 % ---------------------------------------------------------------------
0035 img_name         = cfg_entry;
0036 img_name.tag     = 'img_name';
0037 img_name.name    = 'Image name (optional)';
0038 img_name.help    = {['Name of the file with weights (optional). If left empty ',...
0039                     ' an automatic name will be generated.']};
0040 img_name.strtype = 's';
0041 img_name.num     = [0 Inf];
0042 img_name.val     = {''};
0043 
0044 % ---------------------------------------------------------------------
0045 % cv_model Preprocessing
0046 % ---------------------------------------------------------------------
0047 weights        = cfg_exbranch;
0048 weights.tag    = 'weights';
0049 weights.name   = 'Compute weights';
0050 weights.val    = {infile model_name img_name};
0051 weights.help   = {[
0052     'Compute weights. This module computes the linear weights of a classifier ',...
0053     'and saves them as a 4D image. 3 dimensions correspond to the image dimensions specified in ',...
0054     'the second-level mask, while the extra dimension corresponds to the number of folds. ',...
0055     'There is one 3D weights image per fold.']};
0056 weights.prog   = @prt_run_weights;
0057 weights.vout   = @vout_data;
0058 
0059 %------------------------------------------------------------------------
0060 function cdep = vout_data(job)
0061 % Specifies the output from this modules, i.e. the filename of the mat file
0062 
0063 cdep(1)            = cfg_dep;
0064 cdep(1).sname      = 'PRT.mat file';
0065 cdep(1).src_output = substruct('.','files');
0066 cdep(1).tgt_spec   = cfg_findspec({{'filter','mat','strtype','e'}});
0067 %------------------------------------------------------------------------

Generated on Sun 20-May-2012 13:24:48 by m2html © 2005