Skip to content
Snippets Groups Projects
Commit a1feb078 authored by Stéphane Adjemian's avatar Stéphane Adjemian Committed by Sébastien Villemot
Browse files

Added error message when an infinite std. is used with a Gamma shaped prior.

(cherry picked from commit b15cac00)
parent 298466fd
Branches
Tags
No related merge requests found
......@@ -186,6 +186,9 @@ k2 = find(isnan(bayestopt_.p4(k)));
bayestopt_.p3(k(k1)) = zeros(length(k1),1);
bayestopt_.p4(k(k2)) = Inf(length(k2),1);
for i=1:length(k)
if isinf(bayestopt_.p2(k(i)))
error(['Infinite prior standard deviation for parameter ' bayestopt_.name{k(i)} ' is not allowed (Gamma prior)!'])
end
mu = bayestopt_.p1(k(i))-bayestopt_.p3(k(i));
bayestopt_.p7(k(i)) = bayestopt_.p2(k(i))^2/mu ;
bayestopt_.p6(k(i)) = mu/bayestopt_.p7(k(i)) ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment