Skip to content

Commit

Permalink
update notebook to v5: gp-means-cov (#593)
Browse files Browse the repository at this point in the history
* update notebook

* add pr number

* rm row
  • Loading branch information
juanitorduz authored Nov 17, 2023
1 parent 7977f61 commit ead15d5
Show file tree
Hide file tree
Showing 2 changed files with 243 additions and 126 deletions.
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

0 comments on commit ead15d5

Please sign in to comment.