-
Notifications
You must be signed in to change notification settings - Fork 5
Fitting algorithm
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
- 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 infit_single.m
-
model.prepare_for_fit
is called, which loads the power spectrum into the model object and callsmodel.set_cache
to do any one-off computations - The chain is simulated using
mcmc.chain
ormcmc.chain_parallel
depending on whether aparpool
is open - The output from the chain is analyzed, producing the
fit_data
struct which stores information about the posteriors and the optimum fit, andplot_data
struct which contains the XYZ cloud data (only used for plotting)