Skip to content
Romesh Abeysuriya edited this page Oct 11, 2015 · 9 revisions

This page contains information about how the adaptive MCMC system is implemented

MCMC fitting consists of the following steps

  • Get some initial parameter values (manually specified, or automatically given by model.initialize_fit)
  • Simulate a random walk (chain.m)
  • Pick the most likely parameters (fit.m)
  • Compute the posterior marginal distributions (model.make_posterior)

These steps are all driven by fit.m. The steps in fit.m are

  1. You specify the model, the target power spectrum, and the priors and initial conditions. If you don't have any priors or initial conditions e.g., because this is the first fit in a series of fits, you should use model.initialize_fit beforehand, like in fit_single.m
  • model.prepare_for_fit is called, which loads the power spectrum into the model object and calls model.set_cache to do any one-off computations
  • The chain is simulated using mcmc.chain or mcmc.chain_parallel depending on whether a parpool is open
  • The output from the chain is analyzed, producing the fit_data struct which stores information about the posteriors and the optimum fit, and plot_data struct which contains the XYZ cloud data (only used for plotting)
Clone this wiki locally