Skip to content

Update notebook GLM-negative-binomial-regression to pymc v5 #573 #575

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

Merged
merged 7 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
207 changes: 104 additions & 103 deletions examples/generalized_linear_models/GLM-negative-binomial-regression.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,26 @@ jupytext:
format_name: myst
format_version: 0.13
kernelspec:
display_name: Python 3.9.12 ('pymc-dev-py39')
display_name: Python 3 (ipykernel)
language: python
name: python3
myst:
substitutions:
extra_dependencies: seaborn
---

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

:::{post} June, 2022
:::{post} September, 2023
:tags: negative binomial regression, generalized linear model,
:category: beginner
:author: Ian Ozsvald, Abhipsha Das, Benjamin Vincent
:::

:::{include} ../extra_installs.md
:::

```{code-cell} ipython3
import arviz as az
import numpy as np
Expand All @@ -33,7 +39,7 @@ from scipy import stats
RANDOM_SEED = 8927
rng = np.random.default_rng(RANDOM_SEED)

%config InlineBackend.figure_format = 'retina'
%config InlineBackend.figure_format = "retina"
az.style.use("arviz-darkgrid")
```

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

+++

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

+++

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

```{code-cell} ipython3
%load_ext watermark
%watermark -n -u -v -iv -w -p pytensor,aeppl,xarray
%watermark -n -u -v -iv -w -p pytensor,xarray
```

:::{include} ../page_footer.md
:::

```{code-cell} ipython3

```
10 changes: 5 additions & 5 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ablog<0.11
matplotlib
myst-nb
sphinx-codeautolink
sphinx>=5
pymc-sphinx-theme==0.14
sphinx-design
sphinx-copybutton
sphinx-design
sphinx-notfound-page
sphinxcontrib-bibtex
ablog<0.11
sphinxext-opengraph
sphinx-codeautolink
sphinx-notfound-page
matplotlib
sphinxext-rediraffe