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.

Ancestors

Functions

ncm_data_clear

Decrease the reference count of data and sets the pointer data to NULL.

Instance methods

ncm_data_bootstrap_create

Creates a bootstrap object inside of data. Uses the default bsize == fsize.

ncm_data_bootstrap_enabled

Checks whether bootstrap is enabled in data.

ncm_data_bootstrap_remove

Removes a bootstrap object inside of data if any.

ncm_data_bootstrap_resample

Perform one bootstrap, i.e., resample the data with replacement.

ncm_data_bootstrap_set

Sets the bstrap object in data checking if they are compatible.

ncm_data_dup

Duplicate the data object.

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_free

Decrease the reference count of data.

ncm_data_get_desc

Gets data description.

ncm_data_get_dof

Calculates the degrees of freedom associated with the data.

ncm_data_get_length

Return a integer representing the number of data points.

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_is_init
No description available.

ncm_data_is_resampling
No description available.

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_peek_bootstrap
No description available.

ncm_data_peek_desc

Gets data description.

ncm_data_prepare

Prepare all models in data necessary for the statistical calculations.

ncm_data_ref

Increase the reference count of data.

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_set_desc

Sets the data description. It gets a copy of desc.

ncm_data_set_init

Sets the data to initialized or not state.

ncm_data_sigma_vector
No description available.

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.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

NumCosmoMath.Data:bootstrap

The NcmData bootstrap object if any.

NumCosmoMath.Data:desc

Description of the data object.

NumCosmoMath.Data:init
No description available.

NumCosmoMath.Data:long-desc

Description of the data object.

NumCosmoMath.Data:name

Name of the data object.

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.begin
No description available.

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.get_dof

Calculates the degrees of freedom associated with the data.

NumCosmoMath.DataClass.get_length

Return a integer representing the number of data points.

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.