Class
NumCosmoMathData
Description [src]
abstract class NumCosmoMath.Data : GObject.Object
{
/* No available fields */
}
Abstract class for implementing data objects.
The NcmData object represent generic data. This is the root object used when
building a statistical analysis. Every implementation of NcmData envolves
the methods described in NcmDataClass.
A NcmData must implement, at least, the method ncm_data_m2lnL_val() or
ncm_data_leastsquares_f() to perform respectively likelihood or least
squares analysis.
Instance methods
ncm_data_bootstrap_create
Creates a bootstrap object inside of data. Uses the default bsize == fsize.
ncm_data_fisher_matrix
Calculates the Fisher-information matrix I. Note that this is an
additive quantity, i.e., the Fisher-information matrix of different
and uncorrrelated data sets can be added.
ncm_data_fisher_matrix_bias
Calculates the Fisher-information matrix I and the bias vector f
assuming that the true theoretical model is f_true. Note that these
are additive quantities, i.e., the Fisher-information matrix and
the bias vector of different and uncorrrelated data sets can be added.
ncm_data_has_mean_vector
This method returns TRUE if the likelihood implements
the ncm_data_mean_vector() virtual method.
ncm_data_inv_cov_UH
Given the Cholesky decomposition of the inverse covariance $C^{-1} = L\cdot U$ this function returns in-place the product $U\cdot H$.
ncm_data_inv_cov_Uf
Given the Cholesky decomposition of the inverse covariance $C^{-1} = L\cdot U$ this function returns in-place the product $U\cdot\vec{f}$.
ncm_data_leastsquares_f
Calculates the least squares vector $\vec{f}$ using the models contained in
mset and set the results in f.
ncm_data_m2lnL_val
Calculates the value of $-2\ln(L)$, where $L$ represents the likelihood of
the data given the models in mset. The result is stored in m2lnL.
ncm_data_mean_vector
Calculates the Gaussian mean vector (for non-Gaussian distribution it should calculate the Gaussian approximated mean of the actual distribution).
ncm_data_register_shared
Gives data the chance to register, via ncm_serialize_set(), any of its
own internal objects it wants shared (as an anchor, not deep-copied) by
every later ncm_serialize_dup_obj()/ncm_serialize_to_variant() call made
through the same ser — typically a large, read-only, per-instance
payload that would otherwise be duplicated once per parallel worker.
Subclasses only need to override this when they hold such a payload; the
default implementation does nothing.
ncm_data_resample
Resample data in data from the models contained in mset.
During the resampling the data is marked as resampling
and prepare is called.
ncm_data_take_desc
Sets the data description desc without copying it, the desc memory will
be freed (g_free) when the object is freed.
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 NumCosmoMathDataClass {
guint (* get_length) (
NcmData* data
);
guint (* get_dof) (
NcmData* data
);
void (* begin) (
NcmData* data
);
void (* prepare) (
NcmData* data,
NcmMSet* mset
);
void (* resample) (
NcmData* data,
NcmMSet* mset,
NcmRNG* rng
);
void (* leastsquares_f) (
NcmData* data,
NcmMSet* mset,
NcmVector* f
);
void (* m2lnL_val) (
NcmData* data,
NcmMSet* mset,
gdouble* m2lnL
);
void (* mean_vector) (
NcmData* data,
NcmMSet* mset,
NcmVector* mu
);
void (* inv_cov_UH) (
NcmData* data,
NcmMSet* mset,
NcmMatrix* H
);
void (* inv_cov_Uf) (
NcmData* data,
NcmMSet* mset,
NcmVector* f
);
void (* fisher_matrix_bias) (
NcmData* data,
NcmMSet* mset,
NcmVector* f_true,
NcmMatrix** IM,
NcmVector** delta_theta
);
void (* register_shared) (
NcmData* data,
NcmSerialize* ser
);
}
No description available.
Class members
get_length: guint (* get_length) ( NcmData* data )No description available.
get_dof: guint (* get_dof) ( NcmData* data )No description available.
begin: void (* begin) ( NcmData* data )No description available.
prepare: void (* prepare) ( NcmData* data, NcmMSet* mset )No description available.
resample: void (* resample) ( NcmData* data, NcmMSet* mset, NcmRNG* rng )No description available.
leastsquares_f: void (* leastsquares_f) ( NcmData* data, NcmMSet* mset, NcmVector* f )No description available.
m2lnL_val: void (* m2lnL_val) ( NcmData* data, NcmMSet* mset, gdouble* m2lnL )No description available.
mean_vector: void (* mean_vector) ( NcmData* data, NcmMSet* mset, NcmVector* mu )No description available.
inv_cov_UH: void (* inv_cov_UH) ( NcmData* data, NcmMSet* mset, NcmMatrix* H )No description available.
inv_cov_Uf: void (* inv_cov_Uf) ( NcmData* data, NcmMSet* mset, NcmVector* f )No description available.
fisher_matrix_bias: void (* fisher_matrix_bias) ( NcmData* data, NcmMSet* mset, NcmVector* f_true, NcmMatrix** IM, NcmVector** delta_theta )No description available.
register_shared: void (* register_shared) ( NcmData* data, NcmSerialize* ser )No description available.
Virtual methods
NumCosmoMath.DataClass.fisher_matrix
Calculates the Fisher-information matrix I. Note that this is an
additive quantity, i.e., the Fisher-information matrix of different
and uncorrrelated data sets can be added.
NumCosmoMath.DataClass.fisher_matrix_bias
Calculates the Fisher-information matrix I and the bias vector f
assuming that the true theoretical model is f_true. Note that these
are additive quantities, i.e., the Fisher-information matrix and
the bias vector of different and uncorrrelated data sets can be added.
NumCosmoMath.DataClass.inv_cov_UH
Given the Cholesky decomposition of the inverse covariance $C^{-1} = L\cdot U$ this function returns in-place the product $U\cdot H$.
NumCosmoMath.DataClass.inv_cov_Uf
Given the Cholesky decomposition of the inverse covariance $C^{-1} = L\cdot U$ this function returns in-place the product $U\cdot\vec{f}$.
NumCosmoMath.DataClass.leastsquares_f
Calculates the least squares vector $\vec{f}$ using the models contained in
mset and set the results in f.
NumCosmoMath.DataClass.m2lnL_val
Calculates the value of $-2\ln(L)$, where $L$ represents the likelihood of
the data given the models in mset. The result is stored in m2lnL.
NumCosmoMath.DataClass.mean_vector
Calculates the Gaussian mean vector (for non-Gaussian distribution it should calculate the Gaussian approximated mean of the actual distribution).
NumCosmoMath.DataClass.prepare
Prepare all models in data necessary for the statistical calculations.
NumCosmoMath.DataClass.register_shared
Gives data the chance to register, via ncm_serialize_set(), any of its
own internal objects it wants shared (as an anchor, not deep-copied) by
every later ncm_serialize_dup_obj()/ncm_serialize_to_variant() call made
through the same ser — typically a large, read-only, per-instance
payload that would otherwise be duplicated once per parallel worker.
Subclasses only need to override this when they hold such a payload; the
default implementation does nothing.
NumCosmoMath.DataClass.resample
Resample data in data from the models contained in mset.
During the resampling the data is marked as resampling
and prepare is called.