Home > vbmeg > functions > template > vb_set_bayes_parm_test.m

vb_set_bayes_parm_test

PURPOSE ^

Parameter setting of "bayes_parm" --- sample file

SYNOPSIS ^

function [bayes_parm] = vb_set_bayes_parm_test(proj_root)

DESCRIPTION ^

 Parameter setting of "bayes_parm" --- sample file
  bayes_parm = vb_set_bayes_parm_test(proj_root)

 proj_root  : Root directory of your data files.
              All file names should be relative path from proj_root.
 bayes_parm : set of estimation parameters
              See help of vb_set_bayes_parm for the meaning of each fields
  You should copy this file to your local directory 
     and modify according to your environment.
  Alternately, you can make 'bayes_parm' parameter file using GUI.
 
 2006/09/20 ver 0.5 by M. Sato

 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 [bayes_parm] = vb_set_bayes_parm_test(proj_root)
0002 % Parameter setting of "bayes_parm" --- sample file
0003 %  bayes_parm = vb_set_bayes_parm_test(proj_root)
0004 %
0005 % proj_root  : Root directory of your data files.
0006 %              All file names should be relative path from proj_root.
0007 % bayes_parm : set of estimation parameters
0008 %              See help of vb_set_bayes_parm for the meaning of each fields
0009 %  You should copy this file to your local directory
0010 %     and modify according to your environment.
0011 %  Alternately, you can make 'bayes_parm' parameter file using GUI.
0012 %
0013 % 2006/09/20 ver 0.5 by M. Sato
0014 %
0015 % Copyright (C) 2011, ATR All Rights Reserved.
0016 % License : New BSD License(see VBMEG_LICENSE.txt)
0017 
0018 % Set default parameter
0019 bayes_parm = vb_set_bayes_default_parameters;
0020 
0021 % Root directory of data files
0022 if ~exist('proj_root', 'var')
0023     error('Input argument proj_root is not given!!')
0024 end
0025 
0026 % Data file
0027 MRI_ID = '100009d';
0028 LF_ID  = 'pick1';
0029 MEG_ID = 'retino_150_200_250_300_SN20';
0030 
0031 % --- Input file (relative path from proj_root)
0032 bayes_parm.brainfile = [  MRI_ID  '.brain.mat' ];
0033 bayes_parm.areafile  = [  MRI_ID  '.area.mat'  ];
0034 bayes_parm.actfile   = [  MRI_ID  '.act.mat'   ];
0035 bayes_parm.megfile   = { [MEG_ID  '.meg.mat' ] };
0036 bayes_parm.basisfile = { [MRI_ID '_' LF_ID  '.basis.mat'] };
0037 
0038 % --- Output file(relative path from proj_root)
0039 bayes_parm.bayesfile = 'result/test.bayes.mat'
0040 
0041 % --- Specify current area and fMRI activity
0042 bayes_parm.area_key  = 'focal_all';
0043 bayes_parm.act_key   = 'focal_all';
0044 
0045 % --- Specify time window by sample numbar
0046 bayes_parm.twin_meg  = [151 450]; % Time window for analysis
0047 bayes_parm.Tperiod   = 100; % Time period for current estimation
0048 bayes_parm.Tnext     = 50;  % Time step for next period
0049 
0050 % --- Soft normal constraint flag
0051 bayes_parm.soft_mode = 0;    % = 1: Soft normal constraint
0052 
0053 % --- Estimation model
0054 bayes_parm.forward_model    = 'focal';  % 'focal' or 'focal+global'
0055 bayes_parm.noise_estimation_model = 1;  % 1, ..., 5
0056 
0057 % --- Possible noise_estimation_model
0058 % 'COVARIANCE NOISE' : forward_model = 'focal' or 'focal+global'
0059 %        sx0 = pretriger noise
0060 %        current baseline estimation together with sensor noise estimation
0061 % = 1 :  update_sx = ON,  update_v = OFF  - Default for 'focal'
0062 % = 2 :  update_sx = OFF, update_v = OFF  (NO UPDATE)
0063 %
0064 % 'ISOTROPIC NOISE'  : forward_model = 'focal+global'
0065 %        sx0 = estimated noise with current baseline
0066 %        current baseline estimation together with sensor noise estimation
0067 % = 3 :  update_sx = ON,  update_v = ON   - Default for 'focal+global'
0068 % = 4 :  update_sx = ON,  update_v = OFF  (NO GLOBAL UPDATE)
0069 % = 5 :  update_sx = OFF, update_v = OFF  (NO UPDATE)
0070 %
0071 % --- If sensor noise can be reliably estimated by MEG sensor noise file
0072 %     following setting can be used
0073 %
0074 % bayes_parm.megnoisefile   = []; % MEG sensor noise file
0075 %
0076 % 'FIXED NOISE'      : forward_model = 'focal+global'
0077 %        sx0 = pretriger noise
0078 %        current baseline estimation  with fixed sensor noise
0079 % = 6 :  update_sx = OFF, update_v = ON
0080 % = 7 :  update_sx = OFF, update_v = OFF  (NO UPDATE)
0081 
0082 %%% If you want to use parameters different from defaults,
0083 %%% please modify following lines
0084 
0085 %% --- fMRI prior setting
0086 % bayes_parm.a0_act  = []; % If a0_act = [], it is automatically estimated
0087 % bayes_parm.Ta0     = 0;  % Reliability of fMRI information
0088 % bayes_parm.Ta0_act = 0;  % Reliability of fMRI information
0089 
0090 %% --- Spatial smoothing radius
0091 % bayes_parm.Rfilt = 6e-3; % [m]
0092 
0093 %% --- Iteration number
0094 % bayes_parm.Npre_train = 750;
0095 % bayes_parm.Ntrain     = 1000;
0096 
0097 %% When noise estimation period is different from Pre-trigger period:
0098 % --- Noise estimation time window
0099 % bayes_parm.twin_noise  = [1, 300];    % specify sample index
0100 % --- Baseline activity estimation time window
0101 % bayes_parm.twin_global = bayes_parm.twin_noise;
0102 
0103 %%
0104 %% --- Following settings should be modified by advanced user ---
0105 %%
0106 
0107 %
0108 %  Advanced parameters
0109 %
0110 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0111 
0112 % bayes_parm.skip   = 50;
0113 
0114 %% --- Prior setting
0115 % bayes_parm.a0     = 1;
0116 % bayes_parm.v0     = 0.01;
0117 % bayes_parm.Tv0    = 0;
0118 
0119 %% ---  Global window (optional)
0120 % bayes_parm.basisfile_global = bayes_parm.basisfile;
0121 % bayes_parm.area_key_global  = ['Cortex'];
0122 % bayes_parm.Rfilt_global  = 0;
0123 % bayes_parm.reduce_global = 1;
0124 
0125 %% ---  Soft normal constraint (optional)
0126 % bayes_parm.tan_var = 1 ;
0127 % bayes_parm.var_max = 1/sqrt(2) ;
0128 
0129 %% ---  Flag
0130 % bayes_parm.patch_norm      = ON;
0131 % bayes_parm.trial_average   = OFF;
0132 % bayes_parm.cont_pr         = OFF;
0133 % bayes_parm.temporal_filter = OFF;
0134 % bayes_parm.expand_spatial_filter = ON;
0135 % bayes_parm.variance_orientation  = OFF;
0136 % bayes_parm.remove_crossed_area   = ON;
0137 
0138 %% ---  Optinal parameters
0139 % bayes_parm.reduce = 1;
0140 % bayes_parm.cosval = cos(pi);
0141 % bayes_parm.Fdmin = 1e-50;
0142 % bayes_parm.a_min = 1e-6;
0143 % bayes_parm.a_max = 1e6;
0144 % bayes_parm.noise_reg = 0.1;
0145 
0146 %%
0147 %% --- Do not modify the following
0148 %%
0149 
0150 %
0151 % Noise estimation model
0152 %
0153 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0154 
0155 bayes_parm = vb_set_noise_estimation_model(bayes_parm, proj_root);

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