pymc-devs / pymc-devs/pymc-examples
GLM poisson
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 398
- Forks
- 325
- Avg merge
- 9d 15m
- Merged PRs (30d)
- 1
Description
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/generalized_linear_models/GLM-poisson-regression.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Known changes needed
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
General updates
- Use numpy generator
- ⚠️ code cells 15 and 19 are plain wrong, we are doing
np.exp(np.mean())instead ofnp.mean(np.exp()).
ArviZ related
- code cell 15 (again) is computing the whole summary dataframe, when only a subset of the columns are needed. We should either use
kind="stats"or customize summary, examples of both at: https://arviz-devs.github.io/arviz/api/generated/arviz.summary.html
Notes
Exotic dependencies
None
Computing requirements
Models sample in less than a minute
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open examples/generalized_linear_models/GLM-poisson-regression.ipynb and review the listed updates, starting with code cells 15 and 19. Replace the random-number usage with a NumPy generator, correct the exponential mean calculation, and limit the ArviZ summary as described; rerun the notebook and confirm the models still sample in under a minute.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, numpy, python
- Domain
- documentation, machine-learning
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100