Skip to content

Commit 5f3e906

Browse files
committed
factor potential example
1 parent 3725276 commit 5f3e906

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

examples/factor_potential.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from pymc import *
2+
3+
with Model() as model:
4+
x = Normal('x', 1,1)
5+
model.AddPotential(-x**2)
6+
7+
8+
h = find_hessian()
9+
step = Metropolis(h)
10+
trace = sample(3000, step)

0 commit comments

Comments
 (0)