summaryrefslogtreecommitdiff
path: root/snippets/python-mode/pymc-file
blob: b78b7db89c7a9d5e245790331fc37f554a33e430 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# -*- mode: snippet -*-
# name: pymc file
# key: pmf
# expand-env: ((yas-indent-line 'fixed))
# --
import pymc as pm

with pm.Model() as model:
    $0

if __name__ == '__main__':
    with model:
        start = {}
        trace = pm.sample(1000,
                          step=pm.NUTS(model.vars),
                          start=start)