APEMoST
Defines | Functions

src/parallel_tempering.h File Reference

#include "mcmc.h"
#include "parallel_tempering_beta.h"

Go to the source code of this file.

Defines

#define DUMP_ALL_CHAINS
#define SKIP_CALIBRATE_ALLCHAINS
#define PRINT_PROB_INTERVAL   1000
#define CALIBRATION_FILE   "calibration_results"

Functions

void calibrate_first ()
void prepare_and_run_sampler (unsigned long max_iterations, int append)
void calibrate_rest ()
void analyse_marginal_distributions ()
void analyse_data_probability ()

Define Documentation

#define CALIBRATION_FILE   "calibration_results"
#define DUMP_ALL_CHAINS

should all chains be dumped?

Otherwise, only chain0 is dumped (beta = 1)

#define PRINT_PROB_INTERVAL   1000

After how many iterations do you want the program to write out information?

Note that this should be a multiple of N_SWAP, otherwise you get weird effects, since this is checked after N_SWAP iterations using (iter % PRINT_PROB_INTERVAL == 0).

Referenced by check(), and dump().

#define SKIP_CALIBRATE_ALLCHAINS

Enabling this will only calibrate the first two chains, not all of them. The stepwidths for the rest of the chains will be predicted.


Function Documentation

void analyse_data_probability ( )
void analyse_marginal_distributions ( )
void calibrate_first ( )

applications can run the follwing functions

needs: params file BURN_IN_ITERATIONS start values (in params file)

does: calibrate first chain (beta = 1) writes beta, stepwidths and start values as first line in file calibration_result

provides: stepwidths of first chain (calibration_result) new params file (params_suggest) new start values (calibration_result)

References BURN_IN_ITERATIONS, calc_model(), DEFAULT_ADJUST_STEP, ITER_LIMIT, markov_chain_calibrate(), MAX_AR_DEVIATION, mcmc_check(), MUL, setup_chains(), TARGET_ACCEPTANCE_RATE, write_calibrations_file(), and write_params_file().

Referenced by main().

void calibrate_rest ( )

needs: params file BURN_IN_ITERATIONS first line in calibration_result BETA_ALIGNMENT BETA_0 SKIP_CALIBRATE_ALLCHAINS

does: calibrate remaining chains (beta < 1) writes all betas, stepwidths and start values in file calibration_result

provides: stepwidths of first chain (calibration_result) new params file (params_suggest) new start values (calibration_result)

References mcmc::additional_data, BETA_0, burn_in(), BURN_IN_ITERATIONS, calc_beta_0(), calc_model(), DEFAULT_ADJUST_STEP, dump_vectorln(), dup_vector(), get_beta(), get_chain_beta(), get_n_par(), get_params_best(), get_steps(), ITER_LIMIT, markov_chain_calibrate(), MAX_AR_DEVIATION, mcmc_check(), mem_free, mem_malloc, MUL, N_BETA, mcmc::params_step, read_calibration_file(), set_beta(), set_params(), setup_chains(), TARGET_ACCEPTANCE_RATE, write_calibration_summary(), and write_calibrations_file().

Referenced by main().

void prepare_and_run_sampler ( unsigned long  max_iterations,
int  append 
)