Skip to content

Commit 48af2ff

Browse files
authored
Merge pull request #21 from CloudChaoszero/replace-pymc3-arviz-plots_part9
Replacing PyMC3 plots w/ Arviz plots & sigma Param change [Part 9]
2 parents e566497 + fbd200a commit 48af2ff

File tree

3 files changed

+94
-87
lines changed

3 files changed

+94
-87
lines changed

examples/variational_inference/bayesian_neural_network_advi.ipynb

+3-2
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"source": [
7979
"from warnings import filterwarnings\n",
8080
"\n",
81+
"import arviz as az\n",
8182
"import matplotlib.pyplot as plt\n",
8283
"import numpy as np\n",
8384
"import pymc3 as pm\n",
@@ -787,7 +788,7 @@
787788
}
788789
],
789790
"source": [
790-
"pm.traceplot(trace);"
791+
"az.plot_trace(trace);"
791792
]
792793
},
793794
{
@@ -861,7 +862,7 @@
861862
"name": "python",
862863
"nbconvert_exporter": "python",
863864
"pygments_lexer": "ipython3",
864-
"version": "3.7.7"
865+
"version": "3.8.5"
865866
},
866867
"latex_envs": {
867868
"bibliofile": "biblio.bib",

examples/variational_inference/empirical-approx-overview.ipynb

+84-79
Large diffs are not rendered by default.

examples/variational_inference/variational_api_quickstart.ipynb

+7-6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"outputs": [],
2626
"source": [
2727
"%matplotlib inline\n",
28+
"import arviz as az\n",
2829
"import matplotlib.pyplot as plt\n",
2930
"import numpy as np\n",
3031
"import pymc3 as pm\n",
@@ -164,7 +165,7 @@
164165
}
165166
],
166167
"source": [
167-
"pm.traceplot(trace);"
168+
"az.plot_trace(trace);"
168169
]
169170
},
170171
{
@@ -272,7 +273,7 @@
272273
}
273274
],
274275
"source": [
275-
"pm.plot_posterior(mean_field.sample(1000), color=\"LightSeaGreen\");"
276+
"az.plot_posterior(mean_field.sample(1000), color=\"LightSeaGreen\");"
276277
]
277278
},
278279
{
@@ -1307,7 +1308,7 @@
13071308
}
13081309
],
13091310
"source": [
1310-
"pm.plot_posterior(trace_approx.sample(10000));"
1311+
"az.plot_posterior(trace_approx.sample(10000));"
13111312
]
13121313
},
13131314
{
@@ -2108,9 +2109,9 @@
21082109
],
21092110
"metadata": {
21102111
"kernelspec": {
2111-
"display_name": "Python 3",
2112+
"display_name": "Python (PyMC3 Dev)",
21122113
"language": "python",
2113-
"name": "python3"
2114+
"name": "pymc3-dev"
21142115
},
21152116
"language_info": {
21162117
"codemirror_mode": {
@@ -2122,7 +2123,7 @@
21222123
"name": "python",
21232124
"nbconvert_exporter": "python",
21242125
"pygments_lexer": "ipython3",
2125-
"version": "3.7.7"
2126+
"version": "3.8.5"
21262127
}
21272128
},
21282129
"nbformat": 4,

0 commit comments

Comments
 (0)