Class

NumCosmoMathFitMC

Description [src]

final class NumCosmoMath.FitMC : GObject.Object
{
  /* No available fields */
}

Monte Carlo analysis.

This object implements a Monte Carlo analysis. This object is initialized with a NcmFit object and a NcmMSet object. The NcmFit object is used to calculate the likelihood of the NcmMSet object. The NcmMSet object is used to sample the parameter space.

The NcmFitMC object will resample the likelihood using the input NcmMSet object as a fiducial model. The resampling can be done in three ways:

NCM_FIT_MC_RESAMPLE_FROM_MODEL, #NCM_FIT_MC_RESAMPLE_BOOTSTRAP_NOMIX and

NCM_FIT_MC_RESAMPLE_BOOTSTRAP_MIX. The first option will resample the

likelihood from the input NcmMSet object. The other two options will resample the likelihood from the original likelihood data using bootstrap resampling. The difference between the last two options is that the

NCM_FIT_MC_RESAMPLE_BOOTSTRAP_NOMIX will resample each NcmData separately

while the #NCM_FIT_MC_RESAMPLE_BOOTSTRAP_MIX will resample all NcmData together.

Ancestors

Constructors

ncm_fit_mc_new

Creates a new NcmFitMC object with the fit object fit, the resample type rtype and the run messages type mtype.

ncm_fit_mc_new_funcs_array

Creates a new NcmFitMC object with the fit object fit, the resample type rtype and the run messages type mtype. The functions array funcs_array is used to compute extra columns in the catalog.

Functions

ncm_fit_mc_clear

When this function is invoked, it first checks whether mc is not NULL. If mc is not NULL, the function reduces the reference count of mc by one. If the reference count reaches zero, all memory allocated by the object is released, the object is freed, and mc is set to NULL.

Instance methods

ncm_fit_mc_end_run

Ends a Monte Carlo run. This function will end a Monte Carlo run using the NcmFit object and the NcmMSet object of mc.

ncm_fit_mc_free

Decrement the reference count atomically by one. If the reference count reaches zero, all memory allocated by the object is released and the object is freed.

ncm_fit_mc_get_catalog

Gets the generated catalog of mc.

ncm_fit_mc_is_running

Checks whether a run is running, that is whether ncm_fit_mc_start_run() was called and ncm_fit_mc_end_run() was not called yet.

ncm_fit_mc_keep_order
No description available.

ncm_fit_mc_mean_covar

Computes the mean and covariance of the Monte Carlo run. The mean and covariance are stored in the NcmFit object of mc. The mean is stored in the NcmFitState object of the NcmFit object and in the NcmMSetCatalog object of mc.

ncm_fit_mc_peek_catalog

Peeks the generated catalog of mc.

ncm_fit_mc_reset

Resets the Monte Carlo run. This function will reset the Monte Carlo run erase all samples and reset the catalog.

ncm_fit_mc_run

Runs the 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.

ncm_fit_mc_run_lre

Runs the Monte Carlo until the largest relative error considering the errors on the parameter means is less than lre.

ncm_fit_mc_set_data_file

Sets the data file to be used by the NcmMSetCatalog object of mc.

ncm_fit_mc_set_fiducial

Sets the fiducial model of mc to fiduc. If fiduc is NULL, the fiducial model is set to the model set of the fit object of mc. If fiduc is not NULL, the fiducial model is set to fiduc. If fiduc is not NULL, it must be equal to the model set of the fit object of mc.

ncm_fit_mc_set_first_sample_id

Sets the first sample id of the Monte Carlo run to first_sample_id. This function will skip all samples until it reaches the first_sample_id.

ncm_fit_mc_set_mtype

Sets the run messages type of mc to mtype.

ncm_fit_mc_set_nthreads

Sets the number of threads to be used by mc to nthreads.

ncm_fit_mc_set_rng

Sets the RNG object of mc to rng.

ncm_fit_mc_set_rtype

Sets the resample type of mc to rtype.

ncm_fit_mc_start_run

Starts a Monte Carlo run. This function will start a Monte Carlo run using the NcmFit object and the NcmMSet object of mc.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

NumCosmoMath.FitMC:data-file
No description available.

NumCosmoMath.FitMC:fiducial
No description available.

NumCosmoMath.FitMC:fit
No description available.

NumCosmoMath.FitMC:function-array
No description available.

NumCosmoMath.FitMC:mtype
No description available.

NumCosmoMath.FitMC:nthreads
No description available.

NumCosmoMath.FitMC:rtype
No description available.

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct NumCosmoMathFitMCClass {
  GObjectClass parent_class;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.