Skip to content
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

update notebook to v5: gp-means-cov #593

Merged
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
354 changes: 239 additions & 115 deletions examples/gaussian_processes/GP-MeansAndCovs.ipynb

Large diffs are not rendered by default.

15 changes: 4 additions & 11 deletions examples/gaussian_processes/GP-MeansAndCovs.myst.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ kernelspec:
:author: Bill Engels, Oriol Abril Pla
:::

```{code-cell} ipython3
%matplotlib inline
```

```{code-cell} ipython3
---
papermill:
Expand All @@ -33,13 +29,12 @@ papermill:
status: completed
---
import arviz as az
import matplotlib.cm as cmap
import matplotlib.pyplot as plt
import numpy as np
import pymc as pm
import pytensor
import pytensor.tensor as pt
import scipy.stats as stats

%config InlineBackend.figure_format = "retina"
```

```{code-cell} ipython3
Expand All @@ -52,7 +47,6 @@ papermill:
status: completed
---
RANDOM_SEED = 8927

rng = np.random.default_rng(RANDOM_SEED)
az.style.use("arviz-darkgrid")
plt.rcParams["figure.figsize"] = (10, 4)
Expand Down Expand Up @@ -343,8 +337,6 @@ papermill:
---
c = 2.0
cov = pm.gp.cov.Constant(c)
# Add white noise to stabilise
cov += pm.gp.cov.WhiteNoise(1e-6)

X = np.linspace(0, 2, 200)[:, None]
K = cov(X).eval()
Expand Down Expand Up @@ -1208,6 +1200,7 @@ If we have forgotten an important covariance or mean function, please feel free
## Authors
* Authored by Bill Engels
* Updated to v4 by Oriol Abril Pla in Nov 2022 ([pymc-examples#301](https://github.com/pymc-devs/pymc-examples/pull/301))
* Updated to v5 by Juan Orduz in Nov 2023 ([pymc-examples#593](https://github.com/pymc-devs/pymc-examples/pull/593))

+++

Expand All @@ -1223,7 +1216,7 @@ papermill:
status: completed
---
%load_ext watermark
%watermark -n -u -v -iv -w -p aeppl,xarray
%watermark -n -u -v -iv -w -p xarray
```

:::{include} ../page_footer.md
Expand Down
Loading