|
13 | 13 | "import theano.tensor as tt\n", |
14 | 14 | "from data import load_baseball\n", |
15 | 15 | "from utils import despine, ECDF, despine_traceplot\n", |
| 16 | + "import arviz as az\n", |
16 | 17 | "\n", |
17 | 18 | "# For deterministic reproducibility.\n", |
18 | 19 | "np.random.seed(42)\n", |
|
160 | 161 | "metadata": {}, |
161 | 162 | "outputs": [], |
162 | 163 | "source": [ |
163 | | - "traceplot = pm.traceplot(baseline_trace)\n", |
| 164 | + "traceplot = az.plot_trace(baseline_trace)\n", |
164 | 165 | "despine_traceplot(traceplot)" |
165 | 166 | ] |
166 | 167 | }, |
|
178 | 179 | "outputs": [], |
179 | 180 | "source": [ |
180 | 181 | "ylabels = ylabels = \"AB: \" + df['AB'].astype(str) + ', H: ' + df['H'].astype('str')\n", |
181 | | - "pm.forestplot(baseline_trace, ylabels=ylabels, xlim=[0, 1])" |
| 182 | + "az.plot_forest(baseline_trace, ylabels=ylabels, xlim=[0, 1])" |
182 | 183 | ] |
183 | 184 | }, |
184 | 185 | { |
|
272 | 273 | "metadata": {}, |
273 | 274 | "outputs": [], |
274 | 275 | "source": [ |
275 | | - "ax_arr = pm.traceplot(trace)\n", |
| 276 | + "ax_arr = az.plot_trace(trace)\n", |
276 | 277 | "despine_traceplot(ax_arr)" |
277 | 278 | ] |
278 | 279 | }, |
|
290 | 291 | "outputs": [], |
291 | 292 | "source": [ |
292 | 293 | "ylabels = \"AB: \" + df['AB'].astype(str) + ', H: ' + df['H'].astype('str')\n", |
293 | | - "pm.forestplot(trace, varnames=['thetas'], ylabels=ylabels, xlim=[0, 1])" |
| 294 | + "az.plot_trace(trace, var_names=['thetas'], ylabels=ylabels, xlim=[0, 1])" |
294 | 295 | ] |
295 | 296 | }, |
296 | 297 | { |
|
376 | 377 | ], |
377 | 378 | "metadata": { |
378 | 379 | "kernelspec": { |
379 | | - "display_name": "bayesian-modelling-tutorial", |
| 380 | + "display_name": "Python 3", |
380 | 381 | "language": "python", |
381 | | - "name": "bayesian-modelling-tutorial" |
| 382 | + "name": "python3" |
382 | 383 | }, |
383 | 384 | "language_info": { |
384 | 385 | "codemirror_mode": { |
|
390 | 391 | "name": "python", |
391 | 392 | "nbconvert_exporter": "python", |
392 | 393 | "pygments_lexer": "ipython3", |
393 | | - "version": "3.6.6" |
| 394 | + "version": "3.6.8" |
394 | 395 | } |
395 | 396 | }, |
396 | 397 | "nbformat": 4, |
|
0 commit comments