This package implements Simplified Manifold Preconditioner Adaptation in simple settings such as GLM models.
The algorithm is outlined in Section 3.2 of Spatial Meshing for General Bayesian Multivariate Models.
R package meshed uses SiMPA with non-Gaussian outcomes.
- in
model_alts.h, the classMyDensitycan be used for custom densities. The two requirements are (1) a valid constructor, (2) a validcompute_dens_grad_neghessmethod which computes the density of the target, the gradient, and the negative hessian, at the input valuex. - in
posterior.cpp, make the appropriate changes for initializingMyDensity, then replaceGLMmodelwithMyDensity.