APEMoST
Defines | Functions

src/markov_chain_calibrate.c File Reference

#include <string.h>
#include <stdio.h>
#include <math.h>
#include <gsl/gsl_linalg.h>
#include "mcmc.h"
#include "mcmc_internal.h"
#include "debug.h"
#include "gsl_helper.h"

Defines

#define BETWEEN(x, min, max)   ( (x) >= (min) && (x) <= (max) )
#define MAX(a, b)   ((a) > (b) ? a : b)
#define MIN(a, b)   ((a) < (b) ? a : b)
#define MAX_ACCURACY_IMPROVEMENT   2.8
#define SCALE_LIN_WORST   5
#define SCALE_MIN   0.4

Functions

void markov_chain_calibrate_multilinear_regression (mcmc *m, double desired_acceptance_rate, const double max_ar_deviation, const unsigned int iter_limit, double mul, const double adjust_step)
void markov_chain_calibrate_linear_regression (mcmc *m, double desired_acceptance_rate, const double max_ar_deviation, const unsigned int iter_limit, gsl_matrix *all_stepwidths, gsl_matrix *all_acceptance_rates, gsl_matrix *all_accuracies)
void markov_chain_calibrate_quadratic (mcmc *m, double desired_acceptance_rate, const double max_ar_deviation, const unsigned int iter_limit, double mul, const double adjust_step)
void markov_chain_calibrate_alt (mcmc *m, double desired_acceptance_rate, const double max_ar_deviation, const unsigned int iter_limit, double mul, const double adjust_step)
void markov_chain_calibrate_orig (mcmc *m, double rat_limit, const double max_rat_deviation, const unsigned int iter_limit, double mul, const double adjust_step)
void markov_chain_calibrate (mcmc *m, const unsigned int burn_in_iterations, double desired_acceptance_rate, const double max_ar_deviation, const unsigned int iter_limit, double mul, const double adjust_step)

Define Documentation

#define BETWEEN (   x,
  min,
  max 
)    ( (x) >= (min) && (x) <= (max) )
#define MAX (   a,
 
)    ((a) > (b) ? a : b)
#define MAX_ACCURACY_IMPROVEMENT   2.8
#define MIN (   a,
 
)    ((a) < (b) ? a : b)
#define SCALE_LIN_WORST   5
#define SCALE_MIN   0.4

Function Documentation

void markov_chain_calibrate ( mcmc m,
const unsigned int  burn_in_iterations,
double  desired_acceptance_rate,
const double  max_ar_deviation,
const unsigned int  iter_limit,
double  mul,
const double  adjust_step 
)

create/calibrate the markov-chain

Parameters:
m
desired_acceptance_rateaverage acceptance rates for individual parameters to be achieved
max_ar_deviationallowed deviation from desired_acceptance_rate
burn_in_iterationsnumber of burn-in iterations
iter_limitnumber of iterations for step width calibration
mulfactor for adjusting the step width during calibration
adjust_stepgives the factor with which to adjust the stepwidths after burn-in

References burn_in(), dump_d, markov_chain_calibrate_alt(), markov_chain_calibrate_multilinear_regression(), markov_chain_calibrate_orig(), and markov_chain_calibrate_quadratic().

Referenced by calibrate_first(), and calibrate_rest().

void markov_chain_calibrate_alt ( mcmc m,
double  desired_acceptance_rate,
const double  max_ar_deviation,
const unsigned int  iter_limit,
double  mul,
const double  adjust_step 
)
void markov_chain_calibrate_linear_regression ( mcmc m,
double  desired_acceptance_rate,
const double  max_ar_deviation,
const unsigned int  iter_limit,
gsl_matrix *  all_stepwidths,
gsl_matrix *  all_acceptance_rates,
gsl_matrix *  all_accuracies 
)
void markov_chain_calibrate_multilinear_regression ( mcmc m,
double  desired_acceptance_rate,
const double  max_ar_deviation,
const unsigned int  iter_limit,
double  mul,
const double  adjust_step 
)
void markov_chain_calibrate_orig ( mcmc m,
double  rat_limit,
const double  max_rat_deviation,
const unsigned int  iter_limit,
double  mul,
const double  adjust_step 
)
void markov_chain_calibrate_quadratic ( mcmc m,
double  desired_acceptance_rate,
const double  max_ar_deviation,
const unsigned int  iter_limit,
double  mul,
const double  adjust_step 
)