Top | ![]() |
![]() |
![]() |
![]() |
Functions
Properties
gboolean | auto-trim | Read / Write / Construct |
guint | auto-trim-div | Read / Write / Construct |
gchar * | data-file | Read / Write |
NcmFit * | fit | Read / Write / Construct Only |
NcmObjArray * | function-array | Read / Write / Construct Only |
guint | intermediary-log | Read / Write / Construct |
gdouble | log-time-interval | Read / Write / Construct |
gdouble | lre-step | Read / Write / Construct |
gdouble | max-runs-time | Read / Write / Construct |
guint | min-runs | Read / Write / Construct |
NcmFitRunMsgs | mtype | Read / Write |
guint | nthreads | Read / Write |
gint | nwalkers | Read / Write / Construct Only |
NcmMSetTransKern * | sampler | Read / Write / Construct |
NcmMSetCatalogTrimType | trim-type | Read / Write / Construct |
gboolean | use-mpi | Read / Write / Construct |
NcmFitESMCMCWalker * | walker | Read / Write / Construct Only |
Types and Values
#define | NCM_FIT_ESMCMC_MIN_SYNC_INTERVAL |
#define | NCM_FIT_ESMCMC_M2LNL_ID |
#define | NCM_FIT_ESMCMC_MPI_IN_LEN |
#define | NCM_FIT_ESMCMC_MPI_OUT_LEN |
Functions
ncm_fit_esmcmc_new ()
NcmFitESMCMC * ncm_fit_esmcmc_new (NcmFit *fit
,gint nwalkers
,NcmMSetTransKern *sampler
,NcmFitESMCMCWalker *walker
,NcmFitRunMsgs mtype
);
FIXME
Parameters
fit |
a NcmFit |
|
nwalkers |
number of walkers |
|
sampler |
inital points sampler NcmMSetTransKern |
|
walker |
[allow-none] | |
mtype |
FIXME |
ncm_fit_esmcmc_new_funcs_array ()
NcmFitESMCMC * ncm_fit_esmcmc_new_funcs_array (NcmFit *fit
,gint nwalkers
,NcmMSetTransKern *sampler
,NcmFitESMCMCWalker *walker
,NcmFitRunMsgs mtype
,NcmObjArray *funcs_array
);
FIXME
Parameters
fit |
a NcmFit |
|
nwalkers |
number of walkers |
|
sampler |
inital points sampler NcmMSetTransKern |
|
walker |
[allow-none] | |
mtype |
FIXME |
|
funcs_array |
a NcmObjArray of scalar functions to include in the catalog. |
ncm_fit_esmcmc_set_data_file ()
void ncm_fit_esmcmc_set_data_file (NcmFitESMCMC *esmcmc
,const gchar *filename
);
FIXME
ncm_fit_esmcmc_set_sampler ()
void ncm_fit_esmcmc_set_sampler (NcmFitESMCMC *esmcmc
,NcmMSetTransKern *sampler
);
ncm_fit_esmcmc_set_mtype ()
void ncm_fit_esmcmc_set_mtype (NcmFitESMCMC *esmcmc
,NcmFitRunMsgs mtype
);
FIXME
ncm_fit_esmcmc_set_nthreads ()
void ncm_fit_esmcmc_set_nthreads (NcmFitESMCMC *esmcmc
,guint nthreads
);
If nthreads
is larger than nwalkers / 2, it will be set to
nwalkers / 2.
ncm_fit_esmcmc_use_mpi ()
void ncm_fit_esmcmc_use_mpi (NcmFitESMCMC *esmcmc
,gboolean use_mpi
);
If use_mpi
is TRUE then the paralelization will be acomplished
using MPI if any slaves are available. If no slaves are available
then it falls back to threads.
Note that paralelization will only occur if the number of threads
set using ncm_fit_esmcmc_set_nthreads()
is larger than one.
ncm_fit_esmcmc_set_auto_trim ()
void ncm_fit_esmcmc_set_auto_trim (NcmFitESMCMC *esmcmc
,gboolean enable
);
If enable
is TRUE turns on the auto-trimming when performing a
run_lre.
ncm_fit_esmcmc_set_auto_trim_div ()
void ncm_fit_esmcmc_set_auto_trim_div (NcmFitESMCMC *esmcmc
,guint div
);
Sets the divisor for the auto trim tests.
ncm_fit_esmcmc_set_auto_trim_type ()
void ncm_fit_esmcmc_set_auto_trim_type (NcmFitESMCMC *esmcmc
,NcmMSetCatalogTrimType ttype
);
Sets the trim type.
ncm_fit_esmcmc_set_min_runs ()
void ncm_fit_esmcmc_set_min_runs (NcmFitESMCMC *esmcmc
,guint min_runs
);
Sets the minimum number of runs between tests.
ncm_fit_esmcmc_set_max_runs_time ()
void ncm_fit_esmcmc_set_max_runs_time (NcmFitESMCMC *esmcmc
,gdouble max_runs_time
);
Sets the maximum time for the runs between tests.
ncm_fit_esmcmc_get_accept_ratio ()
gdouble
ncm_fit_esmcmc_get_accept_ratio (NcmFitESMCMC *esmcmc
);
FIXME
ncm_fit_esmcmc_get_offboard_ratio ()
gdouble
ncm_fit_esmcmc_get_offboard_ratio (NcmFitESMCMC *esmcmc
);
FIXME
ncm_fit_esmcmc_get_accept_ratio_last_update ()
gdouble
ncm_fit_esmcmc_get_accept_ratio_last_update
(NcmFitESMCMC *esmcmc
);
FIXME
ncm_fit_esmcmc_get_offboard_ratio_last_update ()
gdouble
ncm_fit_esmcmc_get_offboard_ratio_last_update
(NcmFitESMCMC *esmcmc
);
FIXME
ncm_fit_esmcmc_run ()
void ncm_fit_esmcmc_run (NcmFitESMCMC *esmcmc
,guint n
);
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.
ncm_fit_esmcmc_run_lre ()
void ncm_fit_esmcmc_run_lre (NcmFitESMCMC *esmcmc
,guint prerun
,gdouble lre
);
FIXME
ncm_fit_esmcmc_run_burnin ()
void ncm_fit_esmcmc_run_burnin (NcmFitESMCMC *esmcmc
,guint prerun
,guint ntimes
);
FIXME
ncm_fit_esmcmc_peek_ser ()
NcmSerialize *
ncm_fit_esmcmc_peek_ser (NcmFitESMCMC *esmcmc
);
Peeks the internal NcmSerialize object from esmcmc
.
ncm_fit_esmcmc_get_catalog ()
NcmMSetCatalog *
ncm_fit_esmcmc_get_catalog (NcmFitESMCMC *esmcmc
);
Gets the generated catalog of esmcmc
.
ncm_fit_esmcmc_peek_catalog ()
NcmMSetCatalog *
ncm_fit_esmcmc_peek_catalog (NcmFitESMCMC *esmcmc
);
Gets the generated catalog of esmcmc
.
ncm_fit_esmcmc_peek_fit ()
NcmFit *
ncm_fit_esmcmc_peek_fit (NcmFitESMCMC *esmcmc
);
Gets the NcmFit object used by the sampler.
ncm_fit_esmcmc_validate ()
gboolean ncm_fit_esmcmc_validate (NcmFitESMCMC *esmcmc
,gulong pi
,gulong pf
);
Recalculates the value of $-2\ln(L)$ and compares with the values found in the catalog. This function is particularly useful to check if any problem occured during a multithread evaluation of the likelihood.
Choosing pf
== 0 performs the validation from pi
to the end.
Property Details
The “auto-trim”
property
“auto-trim” gboolean
Whether to automatically trim the catalog.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Default value: FALSE
The “auto-trim-div”
property
“auto-trim-div” guint
Automatically trim divisor.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Allowed values: >= 1
Default value: 100
The “data-file”
property
“data-file” gchar *
Data filename.
Owner: NcmFitESMCMC
Flags: Read / Write
Default value: NULL
The “fit”
property
“fit” NcmFit *
Fit object.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct Only
The “function-array”
property
“function-array” NcmObjArray *
Functions array.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct Only
The “intermediary-log”
property
“intermediary-log” guint
Number of intermediary logs.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Allowed values: >= 1
Default value: 5
The “log-time-interval”
property
“log-time-interval” gdouble
Time interval between log.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Allowed values: >= 1
Default value: 60
The “lre-step”
property
“lre-step” gdouble
Step size in the lre run.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Allowed values: [0.01,1]
Default value: 0.1
The “max-runs-time”
property
“max-runs-time” gdouble
Maximum time between runs.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Allowed values: >= 1
Default value: 7200
The “min-runs”
property
“min-runs” guint
Minumum number of runs.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Allowed values: >= 1
Default value: 10
The “mtype”
property
“mtype” NcmFitRunMsgs
Run messages type.
Owner: NcmFitESMCMC
Flags: Read / Write
Default value: NCM_FIT_RUN_MSGS_SIMPLE
The “nthreads”
property
“nthreads” guint
Number of threads to run.
Owner: NcmFitESMCMC
Flags: Read / Write
Default value: 0
The “nwalkers”
property
“nwalkers” gint
Number of walkers.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct Only
Allowed values: >= 1
Default value: 1
The “sampler”
property
“sampler” NcmMSetTransKern *
Initial points sampler.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
The “trim-type”
property
“trim-type” NcmMSetCatalogTrimType
Trimming tests to apply.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Default value: NCM_MSET_CATALOG_TRIM_TYPE_ESS
The “use-mpi”
property
“use-mpi” gboolean
Use MPI instead of threads.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct
Default value: TRUE
The “walker”
property
“walker” NcmFitESMCMCWalker *
Walker object.
Owner: NcmFitESMCMC
Flags: Read / Write / Construct Only