Skip to content

Commit a0eec1e

Browse files
🎨 Update plots to arviz dependency instead of pymc3 dependency
1 parent a3dd746 commit a0eec1e

9 files changed

+23
-25
lines changed

examples/diagnostics_and_criticism/Diagnosing_biased_Inference_with_Divergences.ipynb

+6-6
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@
462462
}
463463
],
464464
"source": [
465-
"pm.summary(short_trace).round(2)"
465+
"az.summary(short_trace).round(2)"
466466
]
467467
},
468468
{
@@ -495,7 +495,7 @@
495495
],
496496
"source": [
497497
"# plot the trace of log(tau)\n",
498-
"pm.traceplot({\"log(tau)\": short_trace.get_values(varname=\"tau_log__\", combine=False)});"
498+
"az.plot_trace({\"log(tau)\": short_trace.get_values(varname=\"tau_log__\", combine=False)});"
499499
]
500500
},
501501
{
@@ -774,7 +774,7 @@
774774
"# A small wrapper function for displaying the MCMC sampler diagnostics as above\n",
775775
"def report_trace(trace):\n",
776776
" # plot the trace of log(tau)\n",
777-
" pm.traceplot({\"log(tau)\": trace.get_values(varname=\"tau_log__\", combine=False)})\n",
777+
" az.plot_trace({\"log(tau)\": trace.get_values(varname=\"tau_log__\", combine=False)})\n",
778778
"\n",
779779
" # plot the estimate for the mean of log(τ) cumulating mean\n",
780780
" logtau = np.log(trace[\"tau\"])\n",
@@ -1156,7 +1156,7 @@
11561156
}
11571157
],
11581158
"source": [
1159-
"pm.summary(longer_trace).round(2)"
1159+
"az.summary(longer_trace).round(2)"
11601160
]
11611161
},
11621162
{
@@ -2099,7 +2099,7 @@
20992099
}
21002100
],
21012101
"source": [
2102-
"pm.summary(fit_ncp80).round(2)"
2102+
"az.summary(fit_ncp80).round(2)"
21032103
]
21042104
},
21052105
{
@@ -2370,7 +2370,7 @@
23702370
"name": "python",
23712371
"nbconvert_exporter": "python",
23722372
"pygments_lexer": "ipython3",
2373-
"version": "3.7.7"
2373+
"version": "3.8.5"
23742374
}
23752375
},
23762376
"nbformat": 4,

examples/diagnostics_and_criticism/model_averaging.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@
993993
"name": "python",
994994
"nbconvert_exporter": "python",
995995
"pygments_lexer": "ipython3",
996-
"version": "3.7.6"
996+
"version": "3.8.5"
997997
}
998998
},
999999
"nbformat": 4,

examples/diagnostics_and_criticism/model_comparison.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@
548548
"name": "python",
549549
"nbconvert_exporter": "python",
550550
"pygments_lexer": "ipython3",
551-
"version": "3.7.6"
551+
"version": "3.8.5"
552552
}
553553
},
554554
"nbformat": 4,

examples/diagnostics_and_criticism/posterior_predictive.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@
850850
"metadata": {
851851
"anaconda-cloud": {},
852852
"kernelspec": {
853-
"display_name": "pymc3-dev",
853+
"display_name": "Python (PyMC3 Dev)",
854854
"language": "python",
855855
"name": "pymc3-dev"
856856
},

examples/diagnostics_and_criticism/sampler-stats.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@
549549
"name": "python",
550550
"nbconvert_exporter": "python",
551551
"pygments_lexer": "ipython3",
552-
"version": "3.7.7"
552+
"version": "3.8.5"
553553
}
554554
},
555555
"nbformat": 4,

examples/gaussian_processes/GP-Circular.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -628,9 +628,9 @@
628628
],
629629
"metadata": {
630630
"kernelspec": {
631-
"display_name": "pymc3",
631+
"display_name": "Python (PyMC3 Dev)",
632632
"language": "python",
633-
"name": "pymc3"
633+
"name": "pymc3-dev"
634634
},
635635
"language_info": {
636636
"codemirror_mode": {
@@ -642,7 +642,7 @@
642642
"name": "python",
643643
"nbconvert_exporter": "python",
644644
"pygments_lexer": "ipython3",
645-
"version": "3.8.6"
645+
"version": "3.8.5"
646646
}
647647
},
648648
"nbformat": 4,

examples/gaussian_processes/GP-Kron.ipynb

+6-8
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@
340340
" # Place a GP prior over the function f.\n",
341341
" f = gp.prior(\"f\", Xs=Xs)\n",
342342
"\n",
343-
" y_ = pm.Normal(\"y_\", mu=f, sd=sigma, observed=y)"
343+
" y_ = pm.Normal(\"y_\", mu=f, sigma=sigma, observed=y)"
344344
]
345345
},
346346
{
@@ -448,7 +448,7 @@
448448
}
449449
],
450450
"source": [
451-
"pm.traceplot(\n",
451+
"az.plot_trace(\n",
452452
" tr,\n",
453453
" var_names=[\"ls1\", \"ls2\", \"eta\", \"sigma\"],\n",
454454
" lines={\"ls1\": l1_true, \"ls2\": l2_true, \"eta\": eta_true, \"sigma\": sigma_true},\n",
@@ -562,9 +562,7 @@
562562
{
563563
"cell_type": "code",
564564
"execution_count": 14,
565-
"metadata": {
566-
"scrolled": false
567-
},
565+
"metadata": {},
568566
"outputs": [
569567
{
570568
"name": "stdout",
@@ -631,9 +629,9 @@
631629
],
632630
"metadata": {
633631
"kernelspec": {
634-
"display_name": "Python 3",
632+
"display_name": "Python (PyMC3 Dev)",
635633
"language": "python",
636-
"name": "python3"
634+
"name": "pymc3-dev"
637635
},
638636
"language_info": {
639637
"codemirror_mode": {
@@ -645,7 +643,7 @@
645643
"name": "python",
646644
"nbconvert_exporter": "python",
647645
"pygments_lexer": "ipython3",
648-
"version": "3.7.7"
646+
"version": "3.8.5"
649647
}
650648
},
651649
"nbformat": 4,

examples/gaussian_processes/gaussian_process.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,9 @@
404404
"metadata": {
405405
"anaconda-cloud": {},
406406
"kernelspec": {
407-
"display_name": "Python 3",
407+
"display_name": "Python (PyMC3 Dev)",
408408
"language": "python",
409-
"name": "python3"
409+
"name": "pymc3-dev"
410410
},
411411
"language_info": {
412412
"codemirror_mode": {
@@ -418,7 +418,7 @@
418418
"name": "python",
419419
"nbconvert_exporter": "python",
420420
"pygments_lexer": "ipython3",
421-
"version": "3.7.7"
421+
"version": "3.8.5"
422422
}
423423
},
424424
"nbformat": 4,

examples/getting_started.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3788,7 +3788,7 @@
37883788
"name": "python",
37893789
"nbconvert_exporter": "python",
37903790
"pygments_lexer": "ipython3",
3791-
"version": "3.7.7"
3791+
"version": "3.8.5"
37923792
}
37933793
},
37943794
"nbformat": 4,

0 commit comments

Comments
 (0)