Pymc3: Update notebooks and examples

Created on 2 Feb 2018  路  9Comments  路  Source: pymc-devs/pymc3

As discussed in the lab meeting today, we should update all notebooks and examples to the most recent recommended practice, including:

  • remove find_MAP as initiating the sampling
  • multiple chains
  • update kwarg (especially after #2831)
  • unify notebook format, eg:

    • moving original author information to the bottom of the notebook

    • color style (maybe plt.style.use('seaborn-darkgrid')?)

    • move import below title (some are above)

  • simplify http://docs.pymc.io/notebooks/getting_started.html (maybe a bit too formal as the content is mostly taken from the pymc3 paper)
  • some notebook is not indexed on the website: eg updating_priors.ipynb

Checklist for updating notebook:

  • move original author information to the bottom of the notebook
  • remove find_MAP as initiating the sampling, use multiple chains and default sampling as much as possible
  • update kwarg when possible
  • move import below the title and use below format for the first cell
%matplotlib inline
import pymc3 as pm
import numpy as np
import matplotlib.pyplot as plt

plt.style.use('seaborn-darkgrid')
print('Running on PyMC3 v{}'.format(pm.__version__))
docs

Most helpful comment

I would prefer

%matplotlib inline
import pymc3 as pm
import numpy as np
import matplotlib.pyplot as plt

plt.style.use('seaborn-darkgrid')
print('Running on PyMC3 v{}'.format(pm.__version__))

All 9 comments

thumbs up to plt.style.use(['seaborn-darkgrid'])

I think it fits well with our PyMC3 blue scheme

just nitpicking, we can directly use plt.style.use('seaborn-darkgrid')

For ppl participating Docathon today, please follow the checklist below:

  • move original author information to the bottom of the notebook
  • move import below the title
  • use plt.style.use('seaborn-darkgrid')
  • remove find_MAP as initiating the sampling, use multiple chains and default sampling as much as possible
  • update kwarg when possible

Template import (suggestion/edit welcome):

%pylab inline

import numpy as np
import pymc3 as pm
import theano.tensor as tt

plt.style.use('seaborn-darkgrid')
print('Running on PyMC3 v%s'%pm.__version__)

I would prefer

%matplotlib inline
import pymc3 as pm
import numpy as np
import matplotlib.pyplot as plt

plt.style.use('seaborn-darkgrid')
print('Running on PyMC3 v{}'.format(pm.__version__))

I prefer print() which doesnt leave a '' mark :-p

I updated my previous comment with the print() function.

Close as it is outdated.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zscore picture zscore  路  29Comments

MisterRedactus picture MisterRedactus  路  22Comments

springcoil picture springcoil  路  36Comments

junpenglao picture junpenglao  路  20Comments

marciomacielbastos picture marciomacielbastos  路  28Comments