Home > vbmeg > functions > estimation > bayes > dynamics > vb_calc_initialvalue_a.m

vb_calc_initialvalue_a

PURPOSE ^

Calculate initial values of current variance parameter for source

SYNOPSIS ^

function [a_init] = vb_calc_initialvalue_a(bayesinitfile, brainfile, dmri_file, bsnorm, a_min)

DESCRIPTION ^

 Calculate initial values of current variance parameter for source 
 connectivity estimation

 Input:
  bayesinitfile : Bayes file.(.bayes.mat)
  brainfile     : Cortical model file(.brain.mat)
  dmri_file     : diffusion MRI file(.dmri.mat) 
  bsnorm        : Normalization constant of lead field matrix
  a_min         : Minimum value of current variance parameter (= vb_parm.a_min)

 Output:
  a_init [~1840 x 1]
   Initial values of current variance parameter (= vb_parm.a)

 2015/01/29 M.Fukushima

 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 [a_init] = vb_calc_initialvalue_a...
0002   (bayesinitfile, brainfile, dmri_file, bsnorm, a_min)
0003 % Calculate initial values of current variance parameter for source
0004 % connectivity estimation
0005 %
0006 % Input:
0007 %  bayesinitfile : Bayes file.(.bayes.mat)
0008 %  brainfile     : Cortical model file(.brain.mat)
0009 %  dmri_file     : diffusion MRI file(.dmri.mat)
0010 %  bsnorm        : Normalization constant of lead field matrix
0011 %  a_min         : Minimum value of current variance parameter (= vb_parm.a_min)
0012 %
0013 % Output:
0014 %  a_init [~1840 x 1]
0015 %   Initial values of current variance parameter (= vb_parm.a)
0016 %
0017 % 2015/01/29 M.Fukushima
0018 %
0019 % Copyright (C) 2011, ATR All Rights Reserved.
0020 % License : New BSD License(see VBMEG_LICENSE.txt)
0021 
0022 load(bayesinitfile, 'Model');
0023 
0024 % [membershipmat] = make_membershipmat(proj_root, brainfile, parcelsfile);
0025 % note: this information is contained in Diffusion mri file(.dmri.mat)
0026 load(dmri_file, 'membershipmat');
0027 
0028 
0029 Model.a = membershipmat(:,Model.ix)*Model.a; % Works only if patch_norm == OFF
0030 
0031 % Initial values of current variance parameter
0032 a_init = max(Model.a*(bsnorm^2), a_min);

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