Skip to content

Commit 4496027

Browse files
juanitorduzalporter08
authored andcommitted
update notebook to v5: gp-means-cov (pymc-devs#593)
* update notebook * add pr number * rm row
1 parent 6b1bb48 commit 4496027

File tree

2 files changed

+243
-126
lines changed

2 files changed

+243
-126
lines changed

examples/gaussian_processes/GP-MeansAndCovs.ipynb

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

examples/gaussian_processes/GP-MeansAndCovs.myst.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ kernelspec:
1919
:author: Bill Engels, Oriol Abril Pla
2020
:::
2121

22-
```{code-cell} ipython3
23-
%matplotlib inline
24-
```
25-
2622
```{code-cell} ipython3
2723
---
2824
papermill:
@@ -33,13 +29,12 @@ papermill:
3329
status: completed
3430
---
3531
import arviz as az
36-
import matplotlib.cm as cmap
3732
import matplotlib.pyplot as plt
3833
import numpy as np
3934
import pymc as pm
40-
import pytensor
4135
import pytensor.tensor as pt
42-
import scipy.stats as stats
36+
37+
%config InlineBackend.figure_format = "retina"
4338
```
4439

4540
```{code-cell} ipython3
@@ -52,7 +47,6 @@ papermill:
5247
status: completed
5348
---
5449
RANDOM_SEED = 8927
55-
5650
rng = np.random.default_rng(RANDOM_SEED)
5751
az.style.use("arviz-darkgrid")
5852
plt.rcParams["figure.figsize"] = (10, 4)
@@ -343,8 +337,6 @@ papermill:
343337
---
344338
c = 2.0
345339
cov = pm.gp.cov.Constant(c)
346-
# Add white noise to stabilise
347-
cov += pm.gp.cov.WhiteNoise(1e-6)
348340
349341
X = np.linspace(0, 2, 200)[:, None]
350342
K = cov(X).eval()
@@ -1208,6 +1200,7 @@ If we have forgotten an important covariance or mean function, please feel free
12081200
## Authors
12091201
* Authored by Bill Engels
12101202
* Updated to v4 by Oriol Abril Pla in Nov 2022 ([pymc-examples#301](https://github.com/pymc-devs/pymc-examples/pull/301))
1203+
* Updated to v5 by Juan Orduz in Nov 2023 ([pymc-examples#593](https://github.com/pymc-devs/pymc-examples/pull/593))
12111204

12121205
+++
12131206

@@ -1223,7 +1216,7 @@ papermill:
12231216
status: completed
12241217
---
12251218
%load_ext watermark
1226-
%watermark -n -u -v -iv -w -p aeppl,xarray
1219+
%watermark -n -u -v -iv -w -p xarray
12271220
```
12281221

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

0 commit comments

Comments
 (0)