Class
NumCosmoMathLikelihood
Description [src]
final class NumCosmoMath.Likelihood : GObject.Object
{
/* No available fields */
}
Likelihood combining a NcmDataset and priors.
Class combining a NcmDataset and priors. It represents the posterior distribution
of the parameters of a model given the data and the priors. For historical reasons
it is called likelihood, but it is actually the posterior distribution. This will
be fixed in version 1.0 but for backward compatibility for version 0 it will remain
as likelihood.
The posterior distribution is the combination of the NcmDataset containing the
individual likelihoods of the data and the priors. The priors are defined as
NcmPrior objects. The priors can be leastsquares priors or m2lnL priors. The
leastsquares priors compute the leastsquares vectors $\vec{f}i$ and the m2lnL
priors the probabilities $-2\ln P{\mathrm{prior},i}$.
The final posterior distribution is defined as: \begin{equation} -2\ln P_{\mathrm{posterior}} = -2\ln L_{\mathrm{data}} + \sum_i \vec{f}i\cdot\vec{f}_i + \sum_i -2\ln P{\mathrm{prior},i} \end{equation}
Note that to be able to use least squares the posterior must contain least-squares
priors only and all individual likelihoods in the NcmDataset must also be least-squares.
Functions
ncm_likelihood_clear
If lh is not NULL, decreases the reference count of the object
and sets lh to NULL.
Instance methods
ncm_likelihood_free
Decreases the reference count of the object. If the reference count reaches zero, the object is finalized (i.e. its memory is freed).
ncm_likelihood_leastsquares_f
Combines the leastsquares f for the dataset and the priors, note that the
first elements of f are the leastsquares f for the dataset and the last
elements are the leastsquares f for the priors.
ncm_likelihood_m2lnL_val
Combines the m2lnL for the dataset and the priors, note that the priors can be priors that contribute to the leastsquares f or to the m2lnL.
ncm_likelihood_peek_m2lnL_v
Gets the m2lnL vector associated with the NcmLikelihood containing the
last calculated m2lnL values.
ncm_likelihood_priors_leastsquares_f
Calculates the leastsquares f for the priors, note that the all priors
in lh must be priors that contribute to the leastsquares f.
ncm_likelihood_priors_m2lnL_val
Combines the m2lnL for the priors, note that the priors can be priors that contribute to the leastsquares f or to the m2lnL.
ncm_likelihood_priors_m2lnL_vec
Computes the m2lnL for the priors, inserting the result in priors_m2lnL_v.
The order of the elements in priors_m2lnL_v is the same as the order of the
priors in the NcmLikelihood. The first elements are the m2lnL for the priors
that contribute to the leastsquares f and the last elements are the m2lnL for
the priors that contribute to the m2lnL.
ncm_likelihood_priors_peek_f
Peeks the prior at index i in the NcmLikelihood from the array of priors
that contribute to the leastsquares f.
ncm_likelihood_priors_peek_m2lnL
Peek the prior at index i in the NcmLikelihood from the array of priors
that contribute to the m2lnL.
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.