Set penalty equal to minus infinity in mcmc (so that the probability of discarding vectors of

deep parameters such that the steady state does not exist, does not satisfy BK conditions,...
is one).
time-shift
Stéphane Adjemian (Karaba) 2010-03-04 16:15:27 +01:00
parent e511f575a0
commit 2a1889b508
2 changed files with 5 additions and 1 deletions

View File

@ -26,6 +26,8 @@ global bayestopt_ estim_params_ options_ M_ oo_
struct2local(myinputs);
% (re)Set the penalty
bayestopt_.penalty = -Inf;
MhDirectoryName = CheckPath('metropolis');

View File

@ -26,6 +26,8 @@ global bayestopt_ estim_params_ options_ M_ oo_
struct2local(myinputs);
% (re)Set the penalty
bayestopt_.penalty = -Inf;
MhDirectoryName = CheckPath('metropolis');
@ -90,7 +92,7 @@ for b = fblck:nblck,
else
logpost = -inf;
end
if (logpost > -inf) & (log(rand) < logpost-ilogpo2(b))
if (logpost > -inf) && (log(rand) < logpost-ilogpo2(b))
x2(irun,:) = par;
ix2(b,:) = par;
logpo2(irun) = logpost;