In [1]:
import pymc3
%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)
Applied interval-transform to mu and added transformed mu_interval to model.
 [-----------------100%-----------------] 30000 of 30000 complete in 3.9 sec
In [4]:
with pymc3.Model() as model:
    mu = pymc3.Uniform('mu',lower=-1, upper=1, shape=5)    
    trace = pymc3.sample(1000)
    _ = pymc3.traceplot(trace)
Applied interval-transform to mu and added transformed mu_interval to model.
Assigned NUTS to mu_interval
 [-----------------100%-----------------] 1000 of 1000 complete in 0.4 sec
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)
ERROR! Session/line number was not unique in database. History logging moved to new session 315
Applied interval-transform to mu and added transformed mu_interval to model.
 [-----------------100%-----------------] 3000 of 3000 complete in 4.1 sec
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)
 [-----------------100%-----------------] 30000 of 30000 complete in 3.3 sec