Skip to content

Commit 695a1b0

Browse files
Update notebook GLM-negative-binomial-regression to pymc v5 (#575)
* Add seaborn to the requirements-docs.txt * Update notebook GLM-negative-binomial-regression to pymc v5 * Run pre-commit * Remove unrelated files, sort requirements alphabetically, edit notebook based on PR feedback * Add seaborn to notebook extra dependency and remove from requirements-docs.txt * get ready to merge --------- Co-authored-by: Oriol Abril-Pla <[email protected]>
1 parent 2861d6a commit 695a1b0

File tree

3 files changed

+125
-113
lines changed

3 files changed

+125
-113
lines changed

examples/generalized_linear_models/GLM-negative-binomial-regression.ipynb

+104-103
Large diffs are not rendered by default.

examples/generalized_linear_models/GLM-negative-binomial-regression.myst.md

+16-5
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,26 @@ jupytext:
55
format_name: myst
66
format_version: 0.13
77
kernelspec:
8-
display_name: Python 3.9.12 ('pymc-dev-py39')
8+
display_name: Python 3 (ipykernel)
99
language: python
1010
name: python3
11+
myst:
12+
substitutions:
13+
extra_dependencies: seaborn
1114
---
1215

1316
(GLM-negative-binomial-regression)=
1417
# GLM: Negative Binomial Regression
1518

16-
:::{post} June, 2022
19+
:::{post} September, 2023
1720
:tags: negative binomial regression, generalized linear model,
1821
:category: beginner
1922
:author: Ian Ozsvald, Abhipsha Das, Benjamin Vincent
2023
:::
2124

25+
:::{include} ../extra_installs.md
26+
:::
27+
2228
```{code-cell} ipython3
2329
import arviz as az
2430
import numpy as np
@@ -33,7 +39,7 @@ from scipy import stats
3339
RANDOM_SEED = 8927
3440
rng = np.random.default_rng(RANDOM_SEED)
3541
36-
%config InlineBackend.figure_format = 'retina'
42+
%config InlineBackend.figure_format = "retina"
3743
az.style.use("arviz-darkgrid")
3844
```
3945

@@ -221,19 +227,24 @@ Finally, the mean of `nsneeze_alpha` is also quite close to its actual value of
221227

222228
+++
223229

224-
See also, [`bambi's` negative binomial example](https://bambinos.github.io/bambi/master/notebooks/negative_binomial.html) for further reference.
230+
See also, [`bambi's` negative binomial example](https://bambinos.github.io/bambi/notebooks/negative_binomial.html) for further reference.
225231

226232
+++
227233

228234
## Authors
229235
- Created by [Ian Ozsvald](https://github.com/ianozsvald)
230236
- Updated by [Abhipsha Das](https://github.com/chiral-carbon) in August 2021
231237
- Updated by [Benjamin Vincent](https://github.com/drbenvincent) to PyMC v4 in June 2022
238+
- Updated by [Wesley Boelrijk](https://github.com/wesleyboelrijk) to PyMC v5 in September 2023
232239

233240
```{code-cell} ipython3
234241
%load_ext watermark
235-
%watermark -n -u -v -iv -w -p pytensor,aeppl,xarray
242+
%watermark -n -u -v -iv -w -p pytensor,xarray
236243
```
237244

238245
:::{include} ../page_footer.md
239246
:::
247+
248+
```{code-cell} ipython3
249+
250+
```

requirements-docs.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
ablog<0.11
2+
matplotlib
13
myst-nb
4+
sphinx-codeautolink
25
sphinx>=5
36
pymc-sphinx-theme==0.14
4-
sphinx-design
57
sphinx-copybutton
8+
sphinx-design
9+
sphinx-notfound-page
610
sphinxcontrib-bibtex
7-
ablog<0.11
811
sphinxext-opengraph
9-
sphinx-codeautolink
10-
sphinx-notfound-page
11-
matplotlib
1212
sphinxext-rediraffe

0 commit comments

Comments
 (0)