We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc966b7 commit da10a5aCopy full SHA for da10a5a
examples/stochastic_volatility.py
@@ -19,7 +19,7 @@
19
20
sd, lsd = model.TransformedVar(
21
'sd', Exponential(1./.02),
22
- transforms.log, testval = -2.3)
+ transforms.log, testval = -2.5)
23
24
nu = Var('nu', Exponential(1./10))
25
@@ -40,6 +40,7 @@ def hessian(q, nusd):
40
41
return csc_matrix(h)
42
43
+
44
from scipy import optimize
45
s = find_MAP(model, vars = [lvol], fmin = optimize.fmin_l_bfgs_b)
46
s = find_MAP(model, s, vars = [lsd, nu])
@@ -49,6 +50,6 @@ def hessian(q, nusd):
49
50
51
s2 = trace.point(-1)
52
-step = hmc_step(model, model.vars, hessian(s2, 6), trajectory_length = 4)
53
-trace, _,t = sample(8000, step, trace = trace)
+step = hmc_step(model, model.vars, hessian(s2, 6), trajectory_length = 4.)
54
+trace, _,t = sample(4000, step, trace = trace)
55
0 commit comments