Skip to content

Commit 7307b4b

Browse files
authored
Merge pull request #46 from ericmjl/ghpages
ran notebooks manually to check that they at least run
2 parents 22bcf1e + d8f84c2 commit 7307b4b

19 files changed

+79
-63
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
before_script:
33
- "export DISPLAY=:99.0"
44
- "sh -e /etc/init.d/xvfb start"
5-
- sleep 5 # give xvfb some time to start
5+
- sleep 5 # give xvfb some time to start
66

77
language: python
88
matrix:

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ dependencies:
2222
- xarray
2323
- pandoc
2424
- black
25+
- nbstripout
2526
- pip:
2627
- arviz

notebooks/01-Instructor-Probability_a_simulated_introduction.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -808,9 +808,9 @@
808808
],
809809
"metadata": {
810810
"kernelspec": {
811-
"display_name": "Python 3",
811+
"display_name": "bayesian-modelling-tutorial",
812812
"language": "python",
813-
"name": "python3"
813+
"name": "bayesian-modelling-tutorial"
814814
},
815815
"language_info": {
816816
"codemirror_mode": {
@@ -822,7 +822,7 @@
822822
"name": "python",
823823
"nbconvert_exporter": "python",
824824
"pygments_lexer": "ipython3",
825-
"version": "3.6.6"
825+
"version": "3.7.2"
826826
}
827827
},
828828
"nbformat": 4,

notebooks/01-Student-Probability_a_simulated_introduction.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -811,9 +811,9 @@
811811
],
812812
"metadata": {
813813
"kernelspec": {
814-
"display_name": "Python 3",
814+
"display_name": "bayesian-modelling-tutorial",
815815
"language": "python",
816-
"name": "python3"
816+
"name": "bayesian-modelling-tutorial"
817817
},
818818
"language_info": {
819819
"codemirror_mode": {
@@ -825,7 +825,7 @@
825825
"name": "python",
826826
"nbconvert_exporter": "python",
827827
"pygments_lexer": "ipython3",
828-
"version": "3.6.6"
828+
"version": "3.7.2"
829829
}
830830
},
831831
"nbformat": 4,

notebooks/02-Instructor-Parameter_estimation_hypothesis_testing.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@
480480
"cell_type": "markdown",
481481
"metadata": {},
482482
"source": [
483-
"Assume we have a website and want to redesign the layout (_A_) and test whether the new layout (_B_) results in a higher click through rate. When people come to our website we randomly show them layout _A_ or _B_ and see how many people click through for each. First let's generate the data we need:"
483+
"Assume we have a website and want to redesign the layout (*A*) and test whether the new layout (*B*) results in a higher click through rate. When people come to our website we randomly show them layout *A* or *B* and see how many people click through for each. First let's generate the data we need:"
484484
]
485485
},
486486
{
@@ -605,9 +605,9 @@
605605
],
606606
"metadata": {
607607
"kernelspec": {
608-
"display_name": "Python 3",
608+
"display_name": "bayesian-modelling-tutorial",
609609
"language": "python",
610-
"name": "python3"
610+
"name": "bayesian-modelling-tutorial"
611611
},
612612
"language_info": {
613613
"codemirror_mode": {
@@ -619,7 +619,7 @@
619619
"name": "python",
620620
"nbconvert_exporter": "python",
621621
"pygments_lexer": "ipython3",
622-
"version": "3.6.8"
622+
"version": "3.7.2"
623623
}
624624
},
625625
"nbformat": 4,

notebooks/02-Student-Parameter_estimation_hypothesis_testing.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,9 +595,9 @@
595595
],
596596
"metadata": {
597597
"kernelspec": {
598-
"display_name": "Python 3",
598+
"display_name": "bayesian-modelling-tutorial",
599599
"language": "python",
600-
"name": "python3"
600+
"name": "bayesian-modelling-tutorial"
601601
},
602602
"language_info": {
603603
"codemirror_mode": {
@@ -609,7 +609,7 @@
609609
"name": "python",
610610
"nbconvert_exporter": "python",
611611
"pygments_lexer": "ipython3",
612-
"version": "3.6.8"
612+
"version": "3.7.2"
613613
}
614614
},
615615
"nbformat": 4,

notebooks/03-instructor-two-group-iq.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@
338338
"source": [
339339
"fig, [ax1, ax2] = plt.subplots(nrows=1, ncols=2, sharex=True)\n",
340340
"\n",
341-
"x, y = ECDF(samples['drug']) # Want ECDF of drug-treatment PPC samples\n",
341+
"x, y = ECDF(samples['drug'].flatten()) # Want ECDF of drug-treatment PPC samples\n",
342342
"ax1.plot(x, y, label='ppc')\n",
343343
"x, y = ECDF(df[drug_filter]['iq']) # Want ECDF of drug-treatment data\n",
344344
"ax1.plot(x, y, label='data')\n",
@@ -347,7 +347,7 @@
347347
"ax1.set_xlabel('IQ')\n",
348348
"ax1.set_ylabel('Cumulative Fraction')\n",
349349
"\n",
350-
"x, y = ECDF(samples['placebo']) # Want ECDF of placebo-treatment PPC samples\n",
350+
"x, y = ECDF(samples['placebo'].flatten()) # Want ECDF of placebo-treatment PPC samples\n",
351351
"ax2.plot(x, y, label='ppc')\n",
352352
"x, y = ECDF(df[placebo_filter]['iq']) # Want ECDF of placebo-treatment data\n",
353353
"ax2.plot(x, y, label='data')\n",
@@ -378,7 +378,7 @@
378378
"metadata": {},
379379
"outputs": [],
380380
"source": [
381-
"az.plot_posterior(trace=trace, var_names=['diff_means', 'effect_size'])"
381+
"az.plot_posterior(trace, var_names=['diff_means', 'effect_size'])"
382382
]
383383
},
384384
{
@@ -489,7 +489,7 @@
489489
"metadata": {},
490490
"outputs": [],
491491
"source": [
492-
"traces = az.traceplot(trace_alt)"
492+
"traces = az.plot_trace(trace_alt)"
493493
]
494494
},
495495
{
@@ -522,9 +522,9 @@
522522
],
523523
"metadata": {
524524
"kernelspec": {
525-
"display_name": "Python 3",
525+
"display_name": "bayesian-modelling-tutorial",
526526
"language": "python",
527-
"name": "python3"
527+
"name": "bayesian-modelling-tutorial"
528528
},
529529
"language_info": {
530530
"codemirror_mode": {
@@ -536,7 +536,7 @@
536536
"name": "python",
537537
"nbconvert_exporter": "python",
538538
"pygments_lexer": "ipython3",
539-
"version": "3.6.8"
539+
"version": "3.7.2"
540540
},
541541
"toc": {
542542
"base_numbering": 1,

notebooks/03-student-two-group-iq.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,9 +522,9 @@
522522
],
523523
"metadata": {
524524
"kernelspec": {
525-
"display_name": "Python 3",
525+
"display_name": "bayesian-modelling-tutorial",
526526
"language": "python",
527-
"name": "python3"
527+
"name": "bayesian-modelling-tutorial"
528528
},
529529
"language_info": {
530530
"codemirror_mode": {
@@ -536,7 +536,7 @@
536536
"name": "python",
537537
"nbconvert_exporter": "python",
538538
"pygments_lexer": "ipython3",
539-
"version": "3.6.8"
539+
"version": "3.7.2"
540540
},
541541
"toc": {
542542
"base_numbering": 1,

notebooks/04-instructor-multi-group-comparsion-sterilization.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
"outputs": [],
226226
"source": [
227227
"# Plot the trace plots.\n",
228-
"az.plot_trace(trace)"
228+
"traces = az.plot_trace(trace)"
229229
]
230230
},
231231
{
@@ -242,7 +242,7 @@
242242
"outputs": [],
243243
"source": [
244244
"# Use the `plot_forest` or `plot_posterior` functions.\n",
245-
"az.plot_forest(trace, var_names=['perc_reduction'], ylabels=sorted(mapping))"
245+
"az.plot_forest(trace, var_names=['perc_reduction'], credible_interval=0.95)"
246246
]
247247
},
248248
{
@@ -289,7 +289,7 @@
289289
"name": "python",
290290
"nbconvert_exporter": "python",
291291
"pygments_lexer": "ipython3",
292-
"version": "3.6.8"
292+
"version": "3.7.2"
293293
}
294294
},
295295
"nbformat": 4,

notebooks/04-student-multi-group-comparsion-sterilization.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,9 @@
273273
],
274274
"metadata": {
275275
"kernelspec": {
276-
"display_name": "Python 3",
276+
"display_name": "bayesian-modelling-tutorial",
277277
"language": "python",
278-
"name": "python3"
278+
"name": "bayesian-modelling-tutorial"
279279
},
280280
"language_info": {
281281
"codemirror_mode": {
@@ -287,7 +287,7 @@
287287
"name": "python",
288288
"nbconvert_exporter": "python",
289289
"pygments_lexer": "ipython3",
290-
"version": "3.6.8"
290+
"version": "3.7.2"
291291
}
292292
},
293293
"nbformat": 4,

0 commit comments

Comments
 (0)