https://github.com/pymc-devs/pymc3
Tip revision: 40ccb10936fae21dd59db15585aef01cdae36eda authored by Chris Fonnesbeck on 09 January 2017, 14:08:10 UTC
Merge pull request #1647 from pymc-devs/v3.0_release
Merge pull request #1647 from pymc-devs/v3.0_release
Tip revision: 40ccb10
factor_potential.py
from pymc3 import *
with Model() as model:
x = Normal('x', 1, 1)
x2 = Potential('x2', -x ** 2)
start = model.test_point
h = find_hessian(start)
step = Metropolis(model.vars, h)
def run(n=3000):
if n == "short":
n = 50
with model:
trace = sample(n, step, start)
if __name__ == '__main__':
run()