!date
Tue Jun 3 06:22:31 PDT 2014
import pymc as pm, seaborn as sns
%matplotlib inline
pm.__version__
'2.3.2'
X = pm.Uniform('X', 0, 1, value=[0.45, 0.24, 0.68])
@pm.potential
def SNLS(X=X):
logp = -X[0]**2 / X[1]
logp += -X[1]**2 / X[2] # or whatever...
return logp
m = pm.MCMC([X, SNLS])
m.use_step_method(pm.AdaptiveMetropolis, X)
m.sample(100000)
[-----------------100%-----------------] 100000 of 100000 complete in 7.9 sec
pm.Matplot.plot(X)
Plotting X_0 Plotting X_1 Plotting X_2
/homes/abie/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py:1236: UserWarning: findfont: Font family ['Arial'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext]))