Home > vbmeg > demo > test_scripts > vb_test_gave5.m

vb_test_gave5

PURPOSE ^

Execute vb_job_vb.m.

SYNOPSIS ^

function vb_test_gave5

DESCRIPTION ^

 Execute vb_job_vb.m.

 [syntax]
 vb_test_gave5

 [input]

 [output]
 Model parameter files (.bayes.mat).

 [history]
 2010-12-03 Taku Yoshioka

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function vb_test_gave5
0002 % Execute vb_job_vb.m.
0003 %
0004 % [syntax]
0005 % vb_test_gave5
0006 %
0007 % [input]
0008 %
0009 % [output]
0010 % Model parameter files (.bayes.mat).
0011 %
0012 % [history]
0013 % 2010-12-03 Taku Yoshioka
0014 %
0015 % Copyright (C) 2011, ATR All Rights Reserved.
0016 % License : New BSD License(see VBMEG_LICENSE.txt)
0017 
0018 %
0019 % subjects and conditions
0020 %
0021 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0022 sbj_id = {'0001','0002','0003','0004'};
0023 cond_id = {'LR'};
0024 
0025 %
0026 % Noise model parameters
0027 %
0028 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0029 bayes_parm.noise_model = 3;
0030 bayes_parm.noise_reg = 0.1;
0031 
0032 %
0033 % Forward model parameters
0034 %
0035 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0036 bayes_parm.forward_model = 'focal';
0037 bayes_parm.area_key = 'Cortex';
0038 bayes_parm.reduce = 0.5;
0039 bayes_parm.Rfilt = 0.5*8e-3/sqrt(log(2)); % FWHM=8mm
0040 bayes_parm.area_key_global = 'Cortex';
0041 bayes_parm.reduce_global = bayes_parm.reduce;
0042 bayes_parm.Rfilt_global = bayes_parm.Rfilt;
0043 bayes_parm.patch_norm = false;
0044 bayes_parm.expand_spatial_filter = true;
0045 bayes_parm.remove_crossed_area = false;
0046 
0047 %
0048 % Prior parameters
0049 %
0050 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0051 bayes_parm.v0 = 0.01;
0052 bayes_parm.Tv0 = 0;
0053 
0054 %
0055 % Extra-dipole parameters
0056 %
0057 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0058 bayes_parm.extra = [];
0059 
0060 %
0061 % Algorithm parameters
0062 %
0063 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0064 bayes_parm.Ntrain = 1000;
0065 bayes_parm.Npre_train = 1000;
0066 bayes_parm.skip = 50;
0067 bayes_parm.update_sx = true;
0068 bayes_parm.update_v = true;
0069 bayes_parm.Fdmin = 1e-50;
0070 bayes_parm.a_min = 1e-6;
0071 bayes_parm.a_max = 1e6;
0072 bayes_parm.cont_pr = false;
0073 
0074 %
0075 % Soft normal constraint parameters (not publicly supported)
0076 %
0077 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0078 bayes_parm.soft_mode = false;
0079 bayes_parm.variance_orientation = false;
0080 bayes_parm.var_max = 1/sqrt(2);
0081 bayes_parm.tan_var = 1.0;
0082 bayes_parm.cosval = cos(pi);
0083 
0084 %
0085 % Condition and subject loop
0086 %
0087 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0088 for j=1:length(cond_id)
0089   % Condition dependent parameters
0090   switch cond_id{j}
0091    case {'LR'}, 
0092     bayes_parm.a0 = 1;
0093     bayes_parm.a0_act = 500;
0094     bayes_parm.Ta0 = 500;
0095     bayes_parm.Ta0_act = 500;
0096     
0097     bayes_parm.twin_noise = [1 500]; 
0098     bayes_parm.twin_baseline = [1 500];
0099     bayes_parm.twin_meg = [1 1000];
0100     bayes_parm.Tperiod = 1000;
0101     bayes_parm.Tnext = 1000;
0102   end;
0103   
0104   for i=1:length(sbj_id)
0105     % Subject dependent parameters
0106     proj_root = ['./subjects' filesep sbj_id{i} filesep];
0107     bayes_parm.brainfile ...
0108         = [proj_root 'brain' filesep sbj_id{i} '.brain.mat'];
0109     bayes_parm.areafile ...
0110         = [proj_root 'brain' filesep sbj_id{i} '.area.mat'];
0111     bayes_parm.actfile ...
0112         = [proj_root 'brain' filesep sbj_id{i} '.act.mat'];
0113     
0114     % Condition and subject dependent parameters
0115     bayes_parm.act_key = [sbj_id{i} '_' cond_id{j}];
0116     bayes_parm.basisfile ...
0117         = [proj_root 'basis' filesep sbj_id{i} '_' cond_id{j} '.basis.mat'];
0118     bayes_parm.megfile ...
0119         = {[proj_root 'meg' filesep sbj_id{i} '_' cond_id{j} '.meg.mat']};
0120     bayes_parm.basisfile_global = bayes_parm.basisfile;
0121     bayes_parm.megfile_baseline = bayes_parm.megfile;
0122     bayes_parm.bayesfile ...
0123         = [proj_root 'result' filesep sbj_id{i} '_' cond_id{j} ...
0124            '.bayes.mat'];
0125     
0126     % Execute job_vb
0127     vb_job_vb(proj_root,bayes_parm);
0128   end;
0129 end;
0130 
0131 return;

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005