|int(*||adapt_fn )(struct apop_mcmc_proposal_s *ps, struct apop_mcmc_settings *ms)|
|void(*||step_fn )(double const *, struct apop_mcmc_proposal_s *, struct apop_mcmc_settings *)|
A proposal distribution for apop_mcmc_settings and its accompanying functions and information. By default, these will be apop_multivariate_normal models. The
adapt_fn have to be written around the model and your preferences. For the defaults, the step function recenters the mean of the distribution around the last accepted proposal, and the adapt function widens for the Normal if the accept rate is too low; narrows it if the accept rate is too large.
You may provide an array of proposals. The length of the list of proposals must match the number of chunks, as per the
gibbs_chunks setting in the apop_mcmc_settings group that the array of proposals is a part of. Each proposal must be initialized to include all elements, and the step and adapt functions probably have to be written anew for each type of model.
|int(* apop_mcmc_proposal_s::adapt_fn)(struct apop_mcmc_proposal_s *ps, struct apop_mcmc_settings *ms)|
Called every step, to adapt the proposal distribution using information to this point in the chain.
|apop_model * apop_mcmc_proposal_s::proposal|
The distribution from which test parameters will be drawn. After getting the draw using the
draw method of the proposal, the base model's
parameters element is filled using apop_data_fill. If
NULL, apop_model_metropolis will use a Multivariate Normal with the appropriate dimension, mean zero, and covariance matrix I. If not
NULL, be sure to parameterize your model with an initial position.
|void(* apop_mcmc_proposal_s::step_fn)(double const *, struct apop_mcmc_proposal_s *, struct apop_mcmc_settings *)|
Modifies the parameters of the proposal distribution given a successful draw. Typically, this function writes the drawn data point to the parameter set. If the draw is a scalar, the default function sets the 0th element of the model's
parameter set with the draw (works for the apop_normal and other models). If the draw has multiple dimensions, they are all copied to the parameter set, which must have the same size.