From c235eb6a0c12cc4868567f814af515572b59019d Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Wed, 20 Nov 2013 17:20:17 -0500 Subject: Add pymc snippet --- snippets/python-mode/pm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 snippets/python-mode/pm (limited to 'snippets') diff --git a/snippets/python-mode/pm b/snippets/python-mode/pm new file mode 100644 index 0000000..c5fb977 --- /dev/null +++ b/snippets/python-mode/pm @@ -0,0 +1,16 @@ +# name: pymc +# key: pm +# expand-env: ((yas/indent-line 'fixed)) +# -- +import theano.tensor as tn +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) -- cgit v1.2.3