Skip to content

Update notebooks and examples #2834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
junpenglao opened this issue Feb 2, 2018 · 9 comments
Closed

Update notebooks and examples #2834

junpenglao opened this issue Feb 2, 2018 · 9 comments
Labels
Milestone

Comments

@junpenglao
Copy link
Member

junpenglao commented Feb 2, 2018

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 Replace njobs with cores argument #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__))
@junpenglao junpenglao added the docs label Feb 2, 2018
@junpenglao junpenglao added this to the 3.4 milestone Feb 2, 2018
@aloctavodia
Copy link
Member

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

@junpenglao
Copy link
Member Author

I think it fits well with our PyMC3 blue scheme

@aloctavodia
Copy link
Member

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

@junpenglao
Copy link
Member Author

junpenglao commented Feb 9, 2018

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

@junpenglao
Copy link
Member Author

junpenglao commented Feb 9, 2018

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__)

@aloctavodia
Copy link
Member

aloctavodia commented Feb 11, 2018

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__))

@junpenglao
Copy link
Member Author

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

@aloctavodia
Copy link
Member

aloctavodia commented Feb 11, 2018

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

@junpenglao
Copy link
Member Author

Close as it is outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants