Top |
The purpose of this class is to define a collection of NcmData objects. These objects serve as containers for NcmData intended for use within the NumCosmo library. Each individual NcmData object is responsible for defining a distinct data likelihood function. It is essential to note that all NcmData objects are designed to be entirely statistically independent of each other.
NcmDataset * ncm_dataset_new_list (gpointer data0
,...
);
Creates a new NcmDataset object and adds a NULL ended list of NcmData.
NcmDataset * ncm_dataset_new_array (NcmData **data_array
,guint len
);
Creates a new NcmDataset object and adds len
NcmData from data_array
.
data_array |
array of NcmData to be added. |
[array length=len][element-type NcmData] |
len |
length of |
NcmDataset * ncm_dataset_dup (NcmDataset *dset
,NcmSerialize *ser
);
Duplicates the object and all of its content.
NcmDataset *
ncm_dataset_ref (NcmDataset *dset
);
Increases the reference count of dset
by one.
NcmDataset *
ncm_dataset_copy (NcmDataset *dset
);
Duplicates the object getting a reference of its content.
void
ncm_dataset_free (NcmDataset *dset
);
Decreses the reference count of dset
by one.
void
ncm_dataset_clear (NcmDataset **dset
);
Decreses the reference count of *dset
by one, and sets *dset
to NULL.
guint
ncm_dataset_get_length (NcmDataset *dset
);
Number of diferent NcmData in dset
.
guint
ncm_dataset_get_n (NcmDataset *dset
);
Calculates the total number of data set points.
guint
ncm_dataset_get_dof (NcmDataset *dset
);
Calculate the total degrees of freedom associated with all NcmData objects.
gboolean
ncm_dataset_all_init (NcmDataset *dset
);
Checks whenever all NcmData in dset
are initiated.
void ncm_dataset_append_data (NcmDataset *dset
,NcmData *data
);
Appends data
to dset
.
dset |
pointer to type defined by NcmDataset |
|
data |
NcmData object to be appended to NcmDataset |
NcmData * ncm_dataset_get_data (NcmDataset *dset
,guint n
);
Gets the n
-th NcmData in dset
and increses its reference count by one.
NcmData * ncm_dataset_peek_data (NcmDataset *dset
,guint n
);
Gets the n
-th NcmData in dset
.
guint
ncm_dataset_get_ndata (NcmDataset *dset
);
Gets number of NcmData in dset
.
void ncm_dataset_set_data_array (NcmDataset *dset
,NcmObjArray *oa
);
Sets the dset
with oa
.
NcmObjArray *
ncm_dataset_get_data_array (NcmDataset *dset
);
Gets the NcmObjArray from dset
.
NcmObjArray *
ncm_dataset_peek_data_array (NcmDataset *dset
);
Gets the NcmObjArray from dset
.
void ncm_dataset_resample (NcmDataset *dset
,NcmMSet *mset
,NcmRNG *rng
);
Resamples every NcmData in dset
with the models contained in mset
.
void ncm_dataset_bootstrap_set (NcmDataset *dset
,NcmDatasetBStrapType bstype
);
Disable or sets bootstrap method for dset
.
void ncm_dataset_bootstrap_resample (NcmDataset *dset
,NcmRNG *rng
);
Perform one bootstrap as in ncm_data_bootstrap_resample()
in every NcmData
in dset
.
void
ncm_dataset_log_info (NcmDataset *dset
);
Prints in the log the informations associated with every NcmData in dset
.
gchar *
ncm_dataset_get_info (NcmDataset *dset
);
Obtains the informations associated with every NcmData in dset
.
gboolean
ncm_dataset_has_leastsquares_f (NcmDataset *dset
);
Whether all the NcmData in dset
have a ncm_data_leastsquares_f()
method.
gboolean
ncm_dataset_has_m2lnL_val (NcmDataset *dset
);
Whether all the NcmData in dset
have a ncm_data_m2lnL_val()
method.
void ncm_dataset_leastsquares_f (NcmDataset *dset
,NcmMSet *mset
,NcmVector *f
);
void ncm_dataset_m2lnL_val (NcmDataset *dset
,NcmMSet *mset
,gdouble *m2lnL
);
Computes the value of the m2lnL for the data data
.
The value of the m2lnL is stored in m2lnL
.
void ncm_dataset_m2lnL_vec (NcmDataset *dset
,NcmMSet *mset
,NcmVector *m2lnL_v
);
Computes the value of $-2\ln L$ for every element in the dset
.
The values of $-2\ln L$ are stored in the NcmVector m2lnL_v
.
void ncm_dataset_m2lnL_i_val (NcmDataset *dset
,NcmMSet *mset
,guint i
,gdouble *m2lnL_i
);
Get the value of the i
-th data in the dataset.
gboolean
ncm_dataset_has_mean_vector (NcmDataset *dset
);
Whether all the NcmData in dset
have a ncm_data_mean_vector()
method.
void ncm_dataset_mean_vector (NcmDataset *dset
,NcmMSet *mset
,NcmVector *mu
);
Calculates the mean vector f
concatenating the individual ones from each
NcmData in dset
.
void ncm_dataset_fisher_matrix (NcmDataset *dset
,NcmMSet *mset
,NcmMatrix **IM
);
Calculates the Fisher-information matrix I
adding the individual ones from each
NcmData in dset
. If the NcmMatrix pointer in *IM
is NULL a new NcmMatrix will
be allocated otherwise *IM
will be used.
void ncm_dataset_fisher_matrix_bias (NcmDataset *dset
,NcmMSet *mset
,NcmVector *f_true
,NcmMatrix **IM
,NcmVector **delta_theta
);
Calculates the Fisher-information matrix IM
and and the bias vector delta_theta
adding the individual ones from each NcmData in dset
.
dset |
||
mset |
a NcmMSet |
|
f_true |
||
IM |
The fisher matrix. |
[out][transfer full] |
delta_theta |
The bias vector. |
[out][transfer full] |
Bootstrap types.
Bootstrap disabled. |
||
Partial bootstrap, each NcmData is bootstraped individually. |
||
Total bootstrap, all data is bootstraped simultaneously. |
“bootstrap-type”
property“bootstrap-type” NcmDatasetBStrapType
Bootstrap type.
Owner: NcmDataset
Flags: Read / Write
Default value: NCM_DATASET_BSTRAP_DISABLE
“data-array”
property“data-array” NcmObjArray *
NcmData array.
Owner: NcmDataset
Flags: Read / Write