Skip to content

Commit 84d3b06

Browse files
committed
BUG 362c8ee introduced a bug by switching the bounds of the scaling matrix. The bounds 1e-3 are also too stringent for some data types, like returns. This thus adjusts bounds to 1e-8 instead of 1e-3.
1 parent 2d632de commit 84d3b06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pymc3/tuning/scaling.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def find_hessian_diag(point, vars=None, model=None):
105105
return H(Point(point, model=model))
106106

107107

108-
def guess_scaling(point, vars=None, model=None, scaling_bound=1e-3):
108+
def guess_scaling(point, vars=None, model=None, scaling_bound=1e-8):
109109
model = modelcontext(model)
110110
try:
111111
h = find_hessian_diag(point, vars, model=model)
@@ -123,10 +123,10 @@ def adjust_scaling(s, scaling_bound):
123123
return eig_recompose(val, vec)
124124

125125

126-
def adjust_precision(tau, scaling_bound=1e-3):
126+
def adjust_precision(tau, scaling_bound=1e-8):
127127
mag = sqrt(abs(tau))
128128

129-
bounded = bound(log(mag), log(1/scaling_bound), log(scaling_bound))
129+
bounded = bound(log(mag), log(scaling_bound), log(1./scaling_bound))
130130
return exp(bounded)**2
131131

132132

0 commit comments

Comments
 (0)