Added error message when an infinite std. is used with a Gamma shaped prior.
parent
72c2a343b1
commit
b15cac0047
|
@ -186,6 +186,9 @@ k2 = find(isnan(bayestopt_.p4(k)));
|
||||||
bayestopt_.p3(k(k1)) = zeros(length(k1),1);
|
bayestopt_.p3(k(k1)) = zeros(length(k1),1);
|
||||||
bayestopt_.p4(k(k2)) = Inf(length(k2),1);
|
bayestopt_.p4(k(k2)) = Inf(length(k2),1);
|
||||||
for i=1:length(k)
|
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));
|
mu = bayestopt_.p1(k(i))-bayestopt_.p3(k(i));
|
||||||
bayestopt_.p7(k(i)) = bayestopt_.p2(k(i))^2/mu ;
|
bayestopt_.p7(k(i)) = bayestopt_.p2(k(i))^2/mu ;
|
||||||
bayestopt_.p6(k(i)) = mu/bayestopt_.p7(k(i)) ;
|
bayestopt_.p6(k(i)) = mu/bayestopt_.p7(k(i)) ;
|
||||||
|
|
Loading…
Reference in New Issue