Skip to content

Commit e4ca1db

Browse files
authored
Merge pull request #31 from canyon289/arviz
Add ArviZ to to env and 02-Instructor
2 parents 035ad99 + 14fc843 commit e4ca1db

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ dependencies:
2020
- nodejs
2121
- pip:
2222
- pyjanitor
23+
- arviz

notebooks/02-Instructor-Parameter_estimation_hypothesis_testing.ipynb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"import matplotlib.pyplot as plt\n",
2121
"import pymc3 as pm\n",
2222
"from ipywidgets import interact\n",
23+
"import arviz as az\n",
2324
"%matplotlib inline\n",
2425
"sns.set()"
2526
]
@@ -374,7 +375,7 @@
374375
"with Model:\n",
375376
" samples = pm.sample(2000, njobs=1)\n",
376377
"\n",
377-
"pm.plot_posterior(samples);"
378+
"az.plot_posterior(samples, kind='hist');"
378379
]
379380
},
380381
{
@@ -458,7 +459,7 @@
458459
"with model:\n",
459460
" samples = pm.sample(2000, njobs=1)\n",
460461
" \n",
461-
"pm.plot_posterior(samples);"
462+
"az.plot_posterior(samples);"
462463
]
463464
},
464465
{
@@ -540,7 +541,7 @@
540541
"source": [
541542
"with Model:\n",
542543
" samples = pm.sample(2000, njobs=1)\n",
543-
"pm.plot_posterior(samples);"
544+
"az.plot_posterior(samples, kind='hist');"
544545
]
545546
},
546547
{
@@ -598,7 +599,7 @@
598599
"# bust it out & sample\n",
599600
"with model:\n",
600601
" samples = pm.sample(2000, njobs=1)\n",
601-
"pm.plot_posterior(samples, varnames=['μ_1', 'μ_2', 'diff_means', 'effect_size']);"
602+
"az.plot_posterior(samples, var_names=['μ_1', 'μ_2', 'diff_means', 'effect_size'], kind='hist');"
602603
]
603604
}
604605
],
@@ -618,7 +619,7 @@
618619
"name": "python",
619620
"nbconvert_exporter": "python",
620621
"pygments_lexer": "ipython3",
621-
"version": "3.6.6"
622+
"version": "3.6.8"
622623
}
623624
},
624625
"nbformat": 4,

0 commit comments

Comments
 (0)