pyhrf.jde.nrl.gammagaussian.
GamGaussMixtureParamsSampler
(parameters=None, xmlHandler=None, xmlLabel=None, xmlComment=None)¶Bases: pyhrf.jde.samplerbase.GibbsSamplerVariable
#TODO : comment
I_MEAN_CA
= 0¶I_VAR_CA
= 1¶I_VAR_CI
= 2¶NB_PARAMS
= 3¶PARAMS_NAMES
= ['Shape_Activ', 'Scale_Activ', 'Var_Inactiv']¶P_SAMPLE_FLAG
= 'sampleFlag'¶P_SCALE_CA_PR_ALPHA
= 'scaleCAPrAlpha'¶P_SCALE_CA_PR_BETA
= 'scaleCAPrBeta'¶P_SHAPE_CA_PR_MEAN
= 'shapeCAPrMean'¶P_VAL_INI
= 'initialValue'¶P_VAR_CI_PR_ALPHA
= 'varCIPrAlpha'¶P_VAR_CI_PR_BETA
= 'varCIPrBeta'¶checkAndSetInitValue
(variables)¶defaultParameters
= {'initialValue': None, 'sampleFlag': 1, 'scaleCAPrAlpha': 2.5, 'scaleCAPrBeta': 1.5, 'shapeCAPrMean': 10.0, 'varCIPrAlpha': 2.5, 'varCIPrBeta': 0.5}¶linkToData
(dataInput)¶sampleNextInternal
(variables)¶pyhrf.jde.nrl.gammagaussian.
InhomogeneousNRLSampler
(parameters=None, xmlHandler=None, xmlLabel=None, xmlComment=None)¶Bases: pyhrf.xmlio.Initable
, pyhrf.jde.samplerbase.GibbsSamplerVariable
Class handling the Gibbs sampling of Neural Response Levels according to:
Inherits the abstract class C{GibbsSamplerVariable}. #TODO : comment attributes
L_CA
= 1¶L_CI
= 0¶P_BETA
= 'beta'¶P_LABELS_COLORS
= 'labelsColors'¶P_LABELS_INI
= 'labelsIni'¶P_SAMPLE_FLAG
= 'sampleFlag'¶P_SAMPLE_LABELS
= 'sampleLabels'¶P_TRUE_LABELS
= 'trueLabels'¶P_VAL_INI
= 'initialValue'¶calcEnergy
(voxIdx, label, cond)¶checkAndSetInitValue
(variables)¶computeMean
()¶computeMeanClassApost
(j, nrls, varXhj, rb)¶computeVarYTilde
(varXh)¶computeVariablesApost
(varCI, shapeCA, scaleCA, rb, varXh, varLambda)¶countLabels
()¶defaultParameters
= {'beta': 0.4, 'initialValue': None, 'labelsColors': array([ 0., 0.]), 'labelsIni': None, 'sampleFlag': 1, 'sampleLabels': 1}¶finalizeSampling
()¶linkToData
(dataInput)¶sampleLabels
(cond, varCI, varCA, meanCA)¶sampleNextAlt
(variables)¶Define the behaviour of the variable at each sampling step when its sampling is not activated.
sampleNextInternal
(variables)¶Define the behaviour of the variable at each sampling step when its sampling is not activated. Must be overriden in child classes.
samplingWarmUp
(variables)¶#TODO : comment