Skip to content

Commit aa2412d

Browse files
author
Chris Fonnesbeck
committed
Merge branch 'main' of github.com:fonnesbeck/pymc-examples
2 parents 80d58f9 + d26bfb8 commit aa2412d

File tree

201 files changed

+51503
-133054
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+51503
-133054
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ if you would like help in addressing a reviewer's comments,
99
or if you have been waiting too long to hear back on your PR. -->
1010

1111
+ [ ] Notebook follows style guide https://docs.pymc.io/en/latest/contributing/jupyter_style.html
12-
+ [ ] PR description contains a link to the relevant issue: a tracker one for existing notebooks or a proposal one for new notebooks
12+
+ [ ] PR description contains a link to the relevant issue:
13+
* a tracker one for existing notebooks (tracker issues have the "tracker id" label)
14+
* or a proposal one for new notebooks
1315
+ [ ] Check the notebook is not excluded from any pre-commit check: https://github.com/pymc-devs/pymc-examples/blob/main/.pre-commit-config.yaml
1416

1517

.jupytext.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
notebook_metadata_filter = "substitutions"
2-
3-
[formats]
4-
"examples/" = "ipynb"
5-
"myst_nbs/" = ".myst.md:myst"
1+
notebook_metadata_filter = "substitutions,-jupytext.text_representation.jupytext_version"
2+
formats = ["ipynb", ".myst.md:myst"]

.pre-commit-config.yaml

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
repos:
2-
- repo: https://github.com/mwouts/jupytext
3-
rev: v1.13.7
4-
hooks:
5-
- id: jupytext
6-
files: ^examples/.+\.ipynb$
7-
args: ["--sync"]
82
- repo: https://github.com/psf/black
93
rev: 22.3.0
104
hooks:
@@ -36,7 +30,6 @@ repos:
3630
|examples/gaussian_processes/GP-TProcess\.ipynb$
3731
|examples/mixture_models/dependent_density_regression\.ipynb$
3832
|examples/gaussian_processes/GP-Heteroskedastic\.ipynb$
39-
|examples/gaussian_processes/GP-MeansAndCovs\.ipynb$
4033
|examples/samplers/MLDA_variance_reduction_linear_regression\.ipynb$
4134
4235
- repo: https://github.com/FlamingTempura/bibtex-tidy
@@ -54,11 +47,17 @@ repos:
5447
minimum_pre_commit_version: 2.8.0
5548
name: Check notebooks have watermark (see Jupyter style guide from PyMC docs)
5649
types: [jupyter]
57-
- id: no-internal-links
58-
name: Check no internal links are in the docs
50+
- id: notebook_name
51+
entry: '\(notebook_name\)='
52+
language: pygrep
53+
minimum_pre_commit_version: 2.8.0
54+
name: Check notebooks do not use literally notebook_name as target
55+
types: [jupyter]
56+
- id: no-references-as-links
57+
name: Check no references that should be sphinx cross-references are urls
5958
description: >-
60-
'A quick check to prevent urls pointing to pymc docs'
61-
files: ^examples/
59+
'A quick check to prevent urls pointing to pymc docs or other sphinx built docs like arviz, numpy, scipy...'
60+
files: ^examples/.+\.ipynb$
6261
exclude: >
6362
(?x)(index.md|
6463
404.md|
@@ -68,12 +67,10 @@ repos:
6867
examples/case_studies/blackbox_external_likelihood.ipynb|
6968
examples/case_studies/blackbox_external_likelihood_numpy.ipynb|
7069
examples/case_studies/item_response_nba.ipynb|
71-
examples/diagnostics_and_criticism/sampler-stats.ipynb|
7270
examples/gaussian_processes/GP-MaunaLoa2.ipynb|
7371
examples/generalized_linear_models/GLM-logistic.ipynb|
7472
examples/generalized_linear_models/GLM-out-of-sample-predictions.ipynb|
7573
examples/generalized_linear_models/GLM-poisson-regression.ipynb|
76-
examples/generalized_linear_models/GLM-robust.ipynb|
7774
examples/generalized_linear_models/GLM-rolling-regression.ipynb|
7875
examples/generalized_linear_models/GLM-simpsons-paradox.ipynb|
7976
examples/howto/api_quickstart.ipynb|
@@ -82,30 +79,26 @@ repos:
8279
examples/samplers/SMC-ABC_Lotka-Volterra_example.ipynb|
8380
examples/splines/spline.ipynb|
8481
examples/survival_analysis/censored_data.ipynb|
85-
examples/survival_analysis/weibull_aft.ipynb)
82+
examples/survival_analysis/weibull_aft.ipynb|
83+
examples/howto/custom_distribution.ipynb)
8684
entry: >
8785
(?x)(arviz-devs.github.io|
88-
aesara.readthedocs.io|
89-
aeppl.readthedocs.io|
9086
pymc-experimental.readthedocs.io|
9187
docs.pymc.io|
9288
numpy.org/doc|
9389
pymc-examples.readthedocs.io|
9490
docs.python.org|
9591
xarray.pydata.org
9692
python.arviz.org|
97-
docs.xarray.dev)
93+
pytensor.readthedocs.io|
94+
docs.xarray.dev|
95+
www.pymc.io|
96+
docs.scipy.org/doc)
9897
language: pygrep
9998
types_or: [markdown, rst, jupyter]
10099
- repo: https://github.com/mwouts/jupytext
101100
rev: v1.13.7
102101
hooks:
103102
- id: jupytext
104103
files: ^examples/.+\.ipynb$
105-
args: ["--sync"]
106-
- repo: https://github.com/codespell-project/codespell
107-
rev: v2.1.0
108-
hooks:
109-
- id: codespell
110-
files: myst_nbs/
111-
args: ["--write-changes", "--ignore-words-list", "hist,fpr,fro,lik", "--uri-ignore-words-list", "*"]
104+
args: [--from, ipynb, --to, ".myst.md:myst"]

README.rst

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ PyMC Examples
88

99
Supporting examples and tutorials for PyMC, the Python package for Bayesian statistical modeling and Probabilistic Machine Learning!
1010

11-
Check out the `getting started guide <https://docs.pymc.io/en/latest/learning.html#learning>`__, or
11+
Check out the `getting started guide <https://www.pymc.io/projects/docs/en/latest/learn.html>`__, or
1212
interact with live examples using Binder! Each notebook in `PyMC examples gallery
13-
<https://pymc-examples.readthedocs.io>`__ has a binder badge.
13+
<https://www.pymc.io/projects/examples/en/latest/gallery.html>`__ has a binder badge.
1414
For questions on PyMC, head on over to our `PyMC Discourse <https://discourse.pymc.io/>`__ forum.
1515

1616
Contributing
@@ -30,11 +30,8 @@ To ask a question regarding modeling or usage of PyMC we encourage posting to ou
3030

3131
To report an issue, please use the following:
3232

33-
- `PyMC Examples - Issue Tracker <https://github.com/pymc-devs/pymc-examples/issues>`__. For
34-
issues about the example notebooks, errors in the example codes, outdated information, improvement
35-
suggestions...
36-
- `PyMC - Issue Tracker <https://github.com/pymc-devs/pymc/issues>`__. For issues, bugs or
37-
feature requests related to the PyMC library itself.
33+
- `PyMC Examples - Issue Tracker <https://github.com/pymc-devs/pymc-examples/issues>`__. For issues about the example notebooks, errors in the example codes, outdated information, improvement suggestions...
34+
- `PyMC - Issue Tracker <https://github.com/pymc-devs/pymc/issues>`__. For issues, bugs or feature requests related to the PyMC library itself.
3835

3936
Finally, if you need to get in touch for non-technical information about the project, `send us an e-mail <[email protected]>`__.
4037

@@ -45,9 +42,9 @@ If you already know about Bayesian statistics:
4542
----------------------------------------------
4643

4744

48-
- `API quickstart guide <http://docs.pymc.io/notebooks/api_quickstart>`__
49-
- The `PyMC tutorial <http://docs.pymc.io/notebooks/getting_started>`__
50-
- `PyMC examples <https://docs.pymc.io/nb_examples/index.html>`__ and the `API reference <http://docs.pymc.io/api>`__
45+
- `API quickstart guide <https://www.pymc.io/projects/examples/en/latest/howto/api_quickstart.html>`__
46+
- The `PyMC tutorial <https://www.pymc.io/projects/docs/en/stable/learn/core_notebooks/pymc_overview.html>`__
47+
- `PyMC examples <https://www.pymc.io/projects/examples/en/latest/gallery.html>`__ and the `API reference <https://www.pymc.io/projects/docs/en/stable/api.html>`__
5148

5249

5350

@@ -69,7 +66,7 @@ and as part of `PyMCon 2020 <https://discourse.pymc.io/c/pymcon/2020talks/15>`__
6966
Installation
7067
------------
7168

72-
To install PyMC on your system, see its `installation section here <https://docs.pymc.io/en/stable/>`__
69+
To install PyMC on your system, see its `installation section here <https://www.pymc.io/projects/docs/en/stable/installation.html>`__
7370

7471
Citing PyMC
7572
============
@@ -93,18 +90,6 @@ Support
9390

9491
PyMC is a non-profit project under NumFOCUS umbrella. If you want to support PyMC financially, you can donate `here <https://numfocus.salsalabs.org/donate-to-pymc3/index.html>`__.
9592

96-
PyMC for enterprise
97-
===================
98-
`PyMC is now available as part of the Tidelift Subscription!`
99-
100-
Tidelift is working with PyMC and the maintainers of thousands of other open source
101-
projects to deliver commercial support and maintenance for the open source dependencies
102-
you use to build your applications. Save time, reduce risk, and improve code health,
103-
while contributing financially to PyMC -- making it even more robust, reliable and,
104-
let's face it, amazing!
105-
106-
|tidelift_learn| |tidelift_demo|
107-
10893
Sponsors
10994
========
11095

@@ -118,7 +103,3 @@ Sponsors
118103
:target: http://www.numfocus.org/
119104
.. |PyMCLabs| image:: https://raw.githubusercontent.com/pymc-devs/pymc/main/docs/logos/sponsors/pymc-labs.png
120105
:target: https://pymc-labs.io
121-
.. |tidelift_learn| image:: https://img.shields.io/badge/-learn%20more-2dd160.svg?color=orange&labelColor=58595b&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAOCAYAAADJ7fe0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAAVhJREFUKBV1kj0vBFEUhmd2sdZHh2IlGhKFQuOviEYiNlFodCqtUqPxA%2FwCjUTnDygkGoVERFQaZFlE9nreO%2BdM5u5wkifvuee892Pu3CyEcA0DeIc%2B9IwftJsR6Cko3uCjguZdjuBZhhwmYDjGrOC96WED41UtsgEdGEAPlmAfpuAbFF%2BFZLfoMfRBGzThDtLgePPwBIpdddGzOArhPHUXowbNptE2www6a%2Fm96Y3pHN7oQ1s%2B13pxt1ENaKzBFWyWzaJ%2BRO0C9Jny6VPSoKjLVbMDC5bn5OPuJF%2BBSe95PVEMuugY5AegS9fCh7BedP45hRnj8TC34QQUe9bTZyh2KgvFk2vc8GIlXyTfsvqr6bPpNgv52ynnlomZJNpB70Xhl%2Bf6Sa02p1bApEfnETwxVa%2Faj%2BW%2FFtHltmxS%2FO3krvpTtTnVgu%2F6gvHRFvG78Ef3kOe5PimJXycY74blT5R%2BAAAAAElFTkSuQmCC
122-
:target: https://tidelift.com/subscription/pkg/pypi-pymc3?utm_source=pypi-pymc3&utm_medium=referral&utm_campaign=enterprise
123-
.. |tidelift_demo| image:: https://img.shields.io/badge/-request%20a%20demo-2dd160.svg?color=orange&labelColor=58595b&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAOCAYAAADJ7fe0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAAVhJREFUKBV1kj0vBFEUhmd2sdZHh2IlGhKFQuOviEYiNlFodCqtUqPxA%2FwCjUTnDygkGoVERFQaZFlE9nreO%2BdM5u5wkifvuee892Pu3CyEcA0DeIc%2B9IwftJsR6Cko3uCjguZdjuBZhhwmYDjGrOC96WED41UtsgEdGEAPlmAfpuAbFF%2BFZLfoMfRBGzThDtLgePPwBIpdddGzOArhPHUXowbNptE2www6a%2Fm96Y3pHN7oQ1s%2B13pxt1ENaKzBFWyWzaJ%2BRO0C9Jny6VPSoKjLVbMDC5bn5OPuJF%2BBSe95PVEMuugY5AegS9fCh7BedP45hRnj8TC34QQUe9bTZyh2KgvFk2vc8GIlXyTfsvqr6bPpNgv52ynnlomZJNpB70Xhl%2Bf6Sa02p1bApEfnETwxVa%2Faj%2BW%2FFtHltmxS%2FO3krvpTtTnVgu%2F6gvHRFvG78Ef3kOe5PimJXycY74blT5R%2BAAAAAElFTkSuQmCC
124-
:target: https://tidelift.com/subscription/request-a-demo?utm_source=pypi-pymc3&utm_medium=referral&utm_campaign=enterprise

_static/custom.css

Lines changed: 0 additions & 21 deletions
This file was deleted.

_templates/donate.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

_templates/search-field.html

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/case_studies/BART_introduction.ipynb

Lines changed: 50 additions & 50 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)