Skip to content

Commit b33d18d

Browse files
authored
Coregion model notebook fix (#786)
* Added bokeh to pixi * Update coregion model notebook * Removed cruft * Updated pre-commit action version * Updated pre-commit action version
1 parent ff6d886 commit b33d18d

File tree

4 files changed

+226
-292
lines changed

4 files changed

+226
-292
lines changed

.github/workflows/pre-commit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ jobs:
1616
- uses: actions/setup-node@v2
1717
with:
1818
node-version: '18'
19-
- uses: pre-commit/action@v2.0.0
19+
- uses: pre-commit/action@v3.0.0

examples/gaussian_processes/MOGP-Coregion-Hadamard.ipynb

+218-289
Large diffs are not rendered by default.

examples/gaussian_processes/MOGP-Coregion-Hadamard.myst.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jupytext:
55
format_name: myst
66
format_version: 0.13
77
kernelspec:
8-
display_name: Python 3 (ipykernel)
8+
display_name: default
99
language: python
1010
name: python3
1111
---
@@ -26,6 +26,8 @@ This notebook shows how to implement the **Intrinsic Coregionalization Model** (
2626
The advantage of Multi-output Gaussian Processes is their capacity to simultaneously learn and infer many outputs which have the same source of uncertainty from inputs. In this example, we model the average spin rates of several pitchers in different games from a baseball dataset.
2727

2828
```{code-cell} ipython3
29+
import warnings
30+
2931
import arviz as az
3032
import matplotlib.pyplot as plt
3133
import numpy as np
@@ -34,6 +36,8 @@ import pymc as pm
3436
import pytensor.tensor as pt
3537
3638
from pymc.gp.util import plot_gp_dist
39+
40+
warnings.filterwarnings("ignore", category=FutureWarning, module="pytensor.tensor.blas")
3741
```
3842

3943
```{code-cell} ipython3
@@ -93,7 +97,7 @@ adf["avg_spin_rate"].describe()
9397

9498
```{code-cell} ipython3
9599
# There are 142 game dates from 01 Apr 2021 to 03 Oct 2021.
96-
adf.loc[:, "game_date"] = pd.to_datetime(adf.loc[:, "game_date"])
100+
adf["game_date"] = pd.to_datetime(adf["game_date"])
97101
game_dates = adf.loc[:, "game_date"]
98102
game_dates.min(), game_dates.max(), game_dates.nunique(), (game_dates.max() - game_dates.min())
99103
```

pixi.toml

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ numba = ">=0.60.0,<0.61"
2828
scikit-learn = ">=1.5.2,<2"
2929
blackjax = ">=1.2.3,<2"
3030
networkx = ">=3.4.2,<4"
31+
bokeh = ">=3.7.2,<4"
3132

3233
[pypi-dependencies]
3334
pymc-experimental = ">=0.1.2, <0.2"

0 commit comments

Comments
 (0)