Skip to content

Commit

Permalink
accept = 1 in tmcmc.par, 4d-mvnpdf as unit test in fitfun.c
Browse files Browse the repository at this point in the history
  • Loading branch information
phadjido committed Nov 3, 2017
1 parent 69479d8 commit 910d30b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions display/display_gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ void display_curgen_db(int Gen, int NGens)

//double lbnd[] = { 0.01, 0.01, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00};
//double ubnd[] = {20.00, 20.00, 2.50, 0.30, 0.05, 0.60, 1.00, 33.00};
double lbnd[] = {-6, -6};
double ubnd[] = {+6, +6};
double lbnd[] = {-15, -15, -15, -15};
double ubnd[] = {+15, +15, +15, +15};


void display_curgen_db_single(int Gen, int p1, int p2, int Dim, int NGens)
Expand Down
5 changes: 3 additions & 2 deletions inference/TMCMC/fitfun.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include <math.h>

// activate one of the following options
#define _USE_ROSENBROCK_
//#define _USE_ROSENBROCK_
//#define _USE_BVNPDF_
//#define _USE_MIXED_BVNPDF_
//#define _USE_MIXED_MVNPDF_
#define _USE_MIXED_MVNPDF_

#if defined(_USE_MIXED_BVNPDF_)
#include "gsl_headers.h"
Expand All @@ -20,6 +20,7 @@ double mixedbvnpdf(double *x, int n) /* bivariate */

#if defined(_USE_MIXED_MVNPDF_)
#include "gsl_headers.h"
extern double mvnpdf(int n, double *xv, double *mv, double *vm);
double mixedmvnpdf(double *x, int n) /* multivariate */
{
double P = 0;
Expand Down
14 changes: 7 additions & 7 deletions inference/TMCMC/tmcmc.par
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#------------------------ GENERAL PARAMETERS ----------------------------------
# Problem dimension
Nth 2
Nth 4

# Max number of generations
MaxStages 20
Expand All @@ -14,8 +14,8 @@ PopSize 8192

# Chain lengths:
# 1) TMCMC (biased): min=0, max>=PopSize
# 2) BASIS (unbiased): min=max=1
MinChainLength 1
# 2) BASIS (unbiased): min=0, max=1
MinChainLength 0
MaxChainLength 1

# Desired coefficient of variation (=std/mean) of the weights
Expand All @@ -33,9 +33,9 @@ prior_type 0
# Bdef: same boundaries in each dimension
# Bi: boundaries in i-th dimension, e.g. B0 -1 1
# Note: Bi overwrites Bdef
#Bdef -15 15
B0 -6 6
B1 -6 6
Bdef -15 15
#B0 -6 6
#B1 -6 6

# Parameters of the Gaussian prior
# Note: prior_mu size is 1 x Nth, prior_sigma size is Nth x Nth
Expand Down Expand Up @@ -64,7 +64,7 @@ use_proposal_cma 0
# Acceptance type in MCMC:
# 0 - without exp()
# 1 - with exp()
accept 0
accept 1


#---------------------------- OTHER OPTIONS -----------------------------------
Expand Down

0 comments on commit 910d30b

Please sign in to comment.