Top |
NcmFitMCMC * | ncm_fit_mcmc_new () |
void | ncm_fit_mcmc_free () |
void | ncm_fit_mcmc_clear () |
void | ncm_fit_mcmc_set_data_file () |
void | ncm_fit_mcmc_set_mtype () |
void | ncm_fit_mcmc_set_trans_kern () |
void | ncm_fit_mcmc_set_nthreads () |
void | ncm_fit_mcmc_set_fiducial () |
void | ncm_fit_mcmc_set_rng () |
gdouble | ncm_fit_mcmc_get_accept_ratio () |
void | ncm_fit_mcmc_start_run () |
void | ncm_fit_mcmc_end_run () |
void | ncm_fit_mcmc_reset () |
void | ncm_fit_mcmc_set_first_sample_id () |
void | ncm_fit_mcmc_run () |
void | ncm_fit_mcmc_run_lre () |
void | ncm_fit_mcmc_mean_covar () |
NcmMSetCatalog * | ncm_fit_mcmc_get_catalog () |
NcmFit * | fit | Read / Write / Construct Only |
NcmFitRunMsgs | mtype | Read / Write |
guint | nthreads | Read / Write |
NcmMSetTransKern * | sampler | Read / Write / Construct |
Markov Chain Monte Carlo (MCMC) analysis is a method for sampling the posterior probability distribution of a set of parameters. It relies on the Metropolis–Hastings algorithm. The transition kernel utilized in this implementation is specified by the NcmMSetTransKern object.
NcmFitMCMC * ncm_fit_mcmc_new (NcmFit *fit
,NcmMSetTransKern *tkern
,NcmFitRunMsgs mtype
);
Creates a new NcmFitMCMC object that will use the tkern
transition kernel to
generate the MCMC proposals.
void
ncm_fit_mcmc_free (NcmFitMCMC *mcmc
);
Decrement the reference count of mcmc
and frees the memory used by it.
void
ncm_fit_mcmc_clear (NcmFitMCMC **mcmc
);
If *mcmc
is not NULL, decrement the reference count of mcmc
and sets *mcmc
to
NULL.
void ncm_fit_mcmc_set_data_file (NcmFitMCMC *mcmc
,const gchar *filename
);
Sets the data file to be used to save the Markov Chain Monte Carlo realizations catalog.
void ncm_fit_mcmc_set_mtype (NcmFitMCMC *mcmc
,NcmFitRunMsgs mtype
);
Sets the messages type to be used during the Markov Chain Monte Carlo run.
void ncm_fit_mcmc_set_trans_kern (NcmFitMCMC *mcmc
,NcmMSetTransKern *tkern
);
Sets the transition kernel to be used during the Markov Chain Monte Carlo run.
void ncm_fit_mcmc_set_nthreads (NcmFitMCMC *mcmc
,guint nthreads
);
Sets the number of threads to be used during the Markov Chain Monte Carlo run.
void ncm_fit_mcmc_set_rng (NcmFitMCMC *mcmc
,NcmRNG *rng
);
Sets the random number generator to be used during the Markov Chain Monte Carlo run.
gdouble
ncm_fit_mcmc_get_accept_ratio (NcmFitMCMC *mcmc
);
Gets the acceptance ratio of the Markov Chain Monte Carlo run.
void
ncm_fit_mcmc_start_run (NcmFitMCMC *mcmc
);
Starts a new run, setup the Markov Chain Monte Carlo object and syncs the catalog.
void
ncm_fit_mcmc_end_run (NcmFitMCMC *mcmc
);
Ends the current run, frees the memory used by the Markov Chain Monte Carlo and syncs the catalog.
void
ncm_fit_mcmc_reset (NcmFitMCMC *mcmc
);
Resets the Markov Chain Monte Carlo object and the catalog.
void ncm_fit_mcmc_set_first_sample_id (NcmFitMCMC *mcmc
,gint first_sample_id
);
Sets the first sample id to be used in the Markov Chain Monte Carlo.
void ncm_fit_mcmc_run (NcmFitMCMC *mcmc
,guint n
);
Runs the Markov Chain Monte Carlo until it reaches the n
-th realization. Note that
if the first_id is non-zero it will run n
- first_id realizations.
void ncm_fit_mcmc_run_lre (NcmFitMCMC *mcmc
,guint prerun
,gdouble lre
);
Runs the Markov Chain Monte Carlo until it reaches the n
-th realization. It starts
by running prerun
realizations and then it runs more realizations until the largest
relative error is less than lre
.
void
ncm_fit_mcmc_mean_covar (NcmFitMCMC *mcmc
);
Computes the mean and covariance of the generated catalog.
NcmMSetCatalog *
ncm_fit_mcmc_get_catalog (NcmFitMCMC *mcmc
);
Gets the generated catalog of mcmc
.
“fit”
property“fit” NcmFit *
Fit object.
Owner: NcmFitMCMC
Flags: Read / Write / Construct Only
“mtype”
property“mtype” NcmFitRunMsgs
Run messages type.
Owner: NcmFitMCMC
Flags: Read / Write
Default value: NCM_FIT_RUN_MSGS_SIMPLE
“nthreads”
property “nthreads” guint
Number of threads to run.
Owner: NcmFitMCMC
Flags: Read / Write
Allowed values: <= 100
Default value: 0
“sampler”
property“sampler” NcmMSetTransKern *
Metropolis–Hastings sampler.
Owner: NcmFitMCMC
Flags: Read / Write / Construct