NcmABC

NcmABC — Abstract class for Approximate Bayesian Computation (ABC).

Functions

Properties

NcmDataset * data-set Read / Write / Construct Only
double epsilon Read / Write / Construct
NcmMSet * mset Read / Write / Construct Only
guint nparticles Read
NcmMSetTransKern * prior Read / Write / Construct Only
NcmMSetTransKern * trans-kernel Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── NcmABC
        ╰── NcABCClusterNCount

Description

Base class for Approximate Bayesian Computation (ABC) methods.

Functions

ncm_abc_free ()

void
ncm_abc_free (NcmABC *abc);

Decreases the reference count of abc by one.

Parameters

abc

a NcmABC

 

ncm_abc_clear ()

void
ncm_abc_clear (NcmABC **abc);

Decreases the reference count of *abc by one, and sets the pointer *abc to NULL. If abc is NULL, this function does nothing. See also: ncm_abc_free()

Parameters

abc

a NcmABC

 

ncm_abc_data_summary ()

gboolean
ncm_abc_data_summary (NcmABC *abc);

Calculates the data summary and stores internally.

[virtual data_summary]

Parameters

abc

a NcmABC

 

Returns

if the summary calculation was successful.


ncm_abc_mock_distance ()

gdouble
ncm_abc_mock_distance (NcmABC *abc,
                       NcmDataset *dset,
                       NcmVector *theta,
                       NcmVector *thetastar,
                       NcmRNG *rng);

Calculates the distance of the new point given by thetastar given the old point theta .

[virtual mock_distance]

Parameters

abc

a NcmABC

 

dset

a NcmDataset

 

theta

a NcmVector

 

thetastar

a NcmVector

 

rng

a NcmRNG

 

Returns

the distance to the new point thetastar .


ncm_abc_distance_prob ()

gdouble
ncm_abc_distance_prob (NcmABC *abc,
                       gdouble distance);

Calculates the probability of the distance been accepted.

[virtual distance_prob]

Parameters

abc

a NcmABC

 

distance

the distance

 

Returns

the probability of accepting the distance .


ncm_abc_update_tkern ()

void
ncm_abc_update_tkern (NcmABC *abc);

Updates the transition kernel present in self->tkern .

[virtual update_tkern]

Parameters

abc

a NcmABC

 

ncm_abc_get_desc ()

const gchar *
ncm_abc_get_desc (NcmABC *abc);

Gets the description of the current ABC implementation.

[virtual get_desc]

Parameters

abc

a NcmABC

 

Returns

the description of the ABC implementation.

[transfer none]


ncm_abc_log_info ()

const gchar *
ncm_abc_log_info (NcmABC *abc);

Gets the informations about the current run of ABC.

[virtual log_info]

Parameters

abc

a NcmABC

 

Returns

the informations about the current run.

[transfer none]


ncm_abc_set_mtype ()

void
ncm_abc_set_mtype (NcmABC *abc,
                   NcmFitRunMsgs mtype);

Sets the message type to be used by the ABC algorithm.

Parameters

abc

a NcmFitMC

 

mtype

a NcmFitRunMsgs

 

ncm_abc_set_data_file ()

void
ncm_abc_set_data_file (NcmABC *abc,
                       const gchar *filename);

Sets the data file to be used by the ABC algorithm.

Parameters

abc

a NcmABC

 

filename

a filename

 

ncm_abc_set_nthreads ()

void
ncm_abc_set_nthreads (NcmABC *abc,
                      guint nthreads);

Sets the number of threads to be used by the ABC algorithm.

Parameters

abc

a NcmABC

 

nthreads

number of threads

 

ncm_abc_set_rng ()

void
ncm_abc_set_rng (NcmABC *abc,
                 NcmRNG *rng);

Sets the random number generator to be used by the ABC algorithm.

Parameters

abc

a NcmABC

 

rng

a NcmRNG

 

ncm_abc_set_trans_kern ()

void
ncm_abc_set_trans_kern (NcmABC *abc,
                        NcmMSetTransKern *tkern);

Sets the transition kernel to be used by the ABC algorithm.

Parameters

abc

a NcmABC

 

tkern

a NcmMSetTransKern

 

ncm_abc_get_dist_quantile ()

gdouble
ncm_abc_get_dist_quantile (NcmABC *abc,
                           gdouble p);

Sets the probability p of the distance distribution.

Parameters

abc

a NcmABC

 

p

a probability

 

ncm_abc_get_accept_ratio ()

gdouble
ncm_abc_get_accept_ratio (NcmABC *abc);

Computes the acceptance ratio of the ABC algorithm.

Parameters

abc

a NcmABC

 

Returns

the acceptance ratio.


ncm_abc_update_epsilon ()

void
ncm_abc_update_epsilon (NcmABC *abc,
                        gdouble epsilon);

Sets the new epsilon value.

Parameters

abc

a NcmABC

 

epsilon

new epsilon.

 

ncm_abc_get_epsilon ()

gdouble
ncm_abc_get_epsilon (NcmABC *abc);

Gets the current epsilon value.

Parameters

abc

a NcmABC

 

Returns

the current epsilon value.


ncm_abc_get_depsilon ()

gdouble
ncm_abc_get_depsilon (NcmABC *abc);

Gets the current delta epsilon value.

Parameters

abc

a NcmABC

 

Returns

the current delta epsilon value.


ncm_abc_get_mtype ()

NcmFitRunMsgs
ncm_abc_get_mtype (NcmABC *abc);

Gets the current NcmFitRunMsgs value.

Parameters

abc

a NcmABC

 

Returns

the current NcmFitRunMsgs value.


ncm_abc_peek_catalog ()

NcmMSetCatalog *
ncm_abc_peek_catalog (NcmABC *abc);

Peeks the NcmMSetCatalog used to store the sample points.

Parameters

abc

a NcmABC

 

Returns

the NcmMSetCatalog.

[transfer none]


ncm_abc_peek_dataset ()

NcmDataset *
ncm_abc_peek_dataset (NcmABC *abc);

Peek the NcmDataset containing the dataset.

Parameters

abc

a NcmABC

 

Returns

the NcmDataset.

[transfer none]


ncm_abc_peek_covar ()

NcmMatrix *
ncm_abc_peek_covar (NcmABC *abc);

Gets the covariance matrix of the sample points.

Parameters

abc

a NcmABC

 

Returns

the covariance matrix.

[transfer none]


ncm_abc_peek_trans_kern ()

NcmMSetTransKern *
ncm_abc_peek_trans_kern (NcmABC *abc);

Peeks the NcmMSetTransKern used to generate the sample points.

Parameters

abc

a NcmABC

 

Returns

the NcmMSetTransKern.

[transfer none]


ncm_abc_start_run ()

void
ncm_abc_start_run (NcmABC *abc);

Starts the ABC run.

Parameters

abc

a NcmABC

 

ncm_abc_end_run ()

void
ncm_abc_end_run (NcmABC *abc);

Ends the ABC run.

Parameters

abc

a NcmABC

 

ncm_abc_reset ()

void
ncm_abc_reset (NcmABC *abc);

Resets the ABC run.

Parameters

abc

a NcmABC

 

ncm_abc_run ()

void
ncm_abc_run (NcmABC *abc,
             guint nparticles);

Generates particlea until n particles are accepted.

Parameters

abc

a NcmABC

 

nparticles

total number of particles to generate

 

ncm_abc_mean_covar ()

void
ncm_abc_mean_covar (NcmABC *abc,
                    NcmFit *fit);

Calculates the mean and covariance matrix of the accepted samples.

Parameters

abc

a NcmABC

 

fit

a NcmFit

 

ncm_abc_start_update ()

void
ncm_abc_start_update (NcmABC *abc);

Starts the update of the transition kernel.

Parameters

abc

a NcmABC

 

ncm_abc_end_update ()

void
ncm_abc_end_update (NcmABC *abc);

Ends the ABC update.

Parameters

abc

a NcmABC

 

ncm_abc_update ()

void
ncm_abc_update (NcmABC *abc);

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.

Parameters

abc

a NcmABC

 

Types and Values

NCM_TYPE_ABC

#define NCM_TYPE_ABC (ncm_abc_get_type ())

struct NcmABCClass

struct NcmABCClass {
};

NCM_ABC_MIN_SYNC_INTERVAL

#define NCM_ABC_MIN_SYNC_INTERVAL (10.0)

NcmABC

typedef struct _NcmABC NcmABC;

Property Details

The “data-set” property

  “data-set”                 NcmDataset *

Dataset.

Owner: NcmABC

Flags: Read / Write / Construct Only


The “epsilon” property

  “epsilon”                  double

epsilon.

Owner: NcmABC

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 1e+20


The “mset” property

  “mset”                     NcmMSet *

Model Set.

Owner: NcmABC

Flags: Read / Write / Construct Only


The “nparticles” property

  “nparticles”               guint

Number of particles.

Owner: NcmABC

Flags: Read

Default value: 100


The “prior” property

  “prior”                    NcmMSetTransKern *

Prior Sampler.

Owner: NcmABC

Flags: Read / Write / Construct Only


The “trans-kernel” property

  “trans-kernel”             NcmMSetTransKern *

Transition Kernel.

Owner: NcmABC

Flags: Read / Write