Skip to content

Commit 7f69099

Browse files
authored
Upgraded weibull-notebook to arviz 1.0 (#845)
* Upgraded weibull-notebook to arviz 1.0 * sync jupytext and fix metadata
1 parent b16be95 commit 7f69099

2 files changed

Lines changed: 136 additions & 144 deletions

File tree

examples/survival_analysis/weibull_aft.ipynb

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

examples/survival_analysis/weibull_aft.myst.md

Lines changed: 6 additions & 6 deletions
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: pymc
8+
display_name: pymc_env
99
language: python
1010
name: python3
1111
myst:
@@ -24,7 +24,7 @@ myst:
2424
:::
2525

2626
```{code-cell} ipython3
27-
import arviz as az
27+
import arviz.preview as az
2828
import numpy as np
2929
import pymc as pm
3030
import pytensor.tensor as pt
@@ -48,7 +48,7 @@ np.random.seed(RANDOM_SEED)
4848
# Set a seed for reproducibility of posterior results
4949
seed: int = sum(map(ord, "aft_weibull"))
5050
rng: np.random.Generator = np.random.default_rng(seed=seed)
51-
az.style.use("arviz-darkgrid")
51+
az.style.use("arviz-variat")
5252
```
5353

5454
## Dataset
@@ -125,7 +125,7 @@ with model_1:
125125
```
126126

127127
```{code-cell} ipython3
128-
az.plot_trace(idata_param1, var_names=["alpha", "beta"])
128+
az.plot_trace_dist(idata_param1, var_names=["alpha", "beta"])
129129
```
130130

131131
```{code-cell} ipython3
@@ -155,7 +155,7 @@ with model_2:
155155
```
156156

157157
```{code-cell} ipython3
158-
az.plot_trace(idata_param2, var_names=["r", "beta"])
158+
az.plot_trace_dist(idata_param2, var_names=["r", "beta"])
159159
```
160160

161161
```{code-cell} ipython3
@@ -190,7 +190,7 @@ with model_3:
190190
```
191191

192192
```{code-cell} ipython3
193-
az.plot_trace(idata_param3)
193+
az.plot_trace_dist(idata_param3)
194194
```
195195

196196
```{code-cell} ipython3

0 commit comments

Comments
 (0)