hbmep.StandardHB

Contents

hbmep.StandardHB#

class hbmep.StandardHB(*args, **kw)[source]#

Bases: BaseModel

Standard hierarchical Bayesian model.

Features and responses are modeled as conditionally independent given their model parameters. In particular, each feature and response combination has its own set of curve and likelihood parameters, which are partially pooled using shared hyperpriors.

This class implements models with three curve functions: rectified-logistic, logistic5, and logistic4. Observations are modeled using a gamma likelihood.

Notes

  • The curve function can be selected as: model._model = model.rectified_logistic (default), model._model = model.logistic5, or model._model = model.logistic4.

  • The priors are specified for TMS data with intensity in 0-100% MSO and response in millivolts (mV). To change the prior specification, inherit from this class and override the _sample_priors method.

  • Setting self.use_mixture = True uses a mixture likelihood with an additional outlier component.