#!/usr/bin/env python # coding: utf-8 # In[1]: import pymc3 get_ipython().run_line_magic('matplotlib', 'inline') # In[2]: with pymc3.Model() as model: mu = pymc3.Uniform('mu',lower=-1, upper=1, shape=5) step = pymc3.Metropolis() trace = pymc3.sample(30000, step) _ = pymc3.traceplot(trace) # In[4]: with pymc3.Model() as model: mu = pymc3.Uniform('mu',lower=-1, upper=1, shape=5) trace = pymc3.sample(1000) _ = pymc3.traceplot(trace) # In[5]: with pymc3.Model() as model: mu = pymc3.Uniform('mu',lower=-1, upper=1, shape=5) step = pymc3.Slice() trace = pymc3.sample(3000, step) _ = pymc3.traceplot(trace) # In[3]: with pymc3.Model() as model: mu = pymc3.Uniform('mu',lower=-1, upper=1, shape=5, transform=None) step = pymc3.Metropolis() trace = pymc3.sample(30000, step) _ = pymc3.traceplot(trace) # In[ ]: