Merge pull request #395 from JohannesPfeifer/prior_violation
Make error message if mode violated prior more explicittime-shift
commit
459a93d2d5
|
@ -927,9 +927,12 @@ if (any(bayestopt_.pshape >0 ) && options_.mh_replic) || ...
|
||||||
bayestopt_.lb = bounds(:,1);
|
bayestopt_.lb = bounds(:,1);
|
||||||
bayestopt_.ub = bounds(:,2);
|
bayestopt_.ub = bounds(:,2);
|
||||||
if any(xparam1 < bounds(:,1)) || any(xparam1 > bounds(:,2))
|
if any(xparam1 < bounds(:,1)) || any(xparam1 > bounds(:,2))
|
||||||
find(xparam1 < bounds(:,1))
|
outside_bound_vars=bayestopt_.name([find(xparam1 < bounds(:,1)); find(xparam1 > bounds(:,2))],:);
|
||||||
find(xparam1 > bounds(:,2))
|
disp_string=[outside_bound_vars{1,:}];
|
||||||
error('Mode values are outside prior bounds. Reduce prior_trunc.')
|
for ii=2:size(outside_bound_vars,1)
|
||||||
|
disp_string=[disp_string,', ',outside_bound_vars{ii,:}];
|
||||||
|
end
|
||||||
|
error(['Mode value(s) of ', disp_string ,' are outside parameter bounds. Potentially, you should set prior_trunc=0.'])
|
||||||
end
|
end
|
||||||
% runs MCMC
|
% runs MCMC
|
||||||
if options_.mh_replic
|
if options_.mh_replic
|
||||||
|
|
Loading…
Reference in New Issue