Skip to content

Commit 5fe69d3

Browse files
committed
DOC Add missing examples, fix some minor headings and made file names more regular.
1 parent 683ea81 commit 5fe69d3

16 files changed

+105
-219
lines changed

docs/source/examples.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ Examples
1212
notebooks/GLM-robust.ipynb
1313
notebooks/GLM-robust-with-outlier-detection.ipynb
1414
notebooks/GLM-model-selection.ipynb
15-
notebooks/rolling_regression.ipynb
15+
notebooks/GLM-rolling-regression.ipynb
1616
notebooks/GLM-logistic.ipynb
1717
notebooks/GLM-hierarchical.ipynb
18+
notebooks/GLM-hierarchical-ADVI.ipynb
19+
notebooks/GLM-hierarchical-advi-minibatch.ipynb
20+
notebooks/GLM-poisson-regression.ipynb
1821
notebooks/pmf-pymc.ipynb
1922
notebooks/rugby_analytics.ipynb
2023
notebooks/posterior_predictive.ipynb
@@ -23,4 +26,7 @@ Examples
2326
notebooks/Bayesian_LogReg.ipynb
2427
notebooks/dp_mix.ipynb
2528
notebooks/bayesian_neural_network_advi.ipynb
29+
notebooks/lda-advi-aevb.ipynb
30+
notebooks/gaussian_mixture_model.ipynb
31+
notebooks/gaussian-mixture-model-advi.ipynb
2632
notebooks/howto_debugging.ipynb

docs/source/notebooks/GLM-hierarchical-ADVI.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# The best of both worlds: Hierarchical Linear Regression in PyMC3"
7+
"# GLM: Hierarchical Linear Regression with ADVI"
88
]
99
},
1010
{
@@ -339,8 +339,9 @@
339339
}
340340
],
341341
"metadata": {
342+
"anaconda-cloud": {},
342343
"kernelspec": {
343-
"display_name": "Python 3",
344+
"display_name": "Python [default]",
344345
"language": "python",
345346
"name": "python3"
346347
},
@@ -354,7 +355,7 @@
354355
"name": "python",
355356
"nbconvert_exporter": "python",
356357
"pygments_lexer": "ipython3",
357-
"version": "3.5.1"
358+
"version": "3.5.2"
358359
}
359360
},
360361
"nbformat": 4,

docs/source/notebooks/GLM-hierarchical-advi-minibatch.ipynb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Mini-batch ADVI on hierarchical regression model\n",
7+
"# GLM: Mini-batch ADVI on hierarchical regression model\n",
88
"Unlike Gaussian mixture models, (hierarchical) regression models have independent variables. These variables affect the likelihood function, but are not random variables. When using mini-batch, we should take care of that. "
99
]
1010
},
@@ -316,22 +316,23 @@
316316
}
317317
],
318318
"metadata": {
319+
"anaconda-cloud": {},
319320
"kernelspec": {
320-
"display_name": "Python 2",
321+
"display_name": "Python [default]",
321322
"language": "python",
322-
"name": "python2"
323+
"name": "python3"
323324
},
324325
"language_info": {
325326
"codemirror_mode": {
326327
"name": "ipython",
327-
"version": 2
328+
"version": 3
328329
},
329330
"file_extension": ".py",
330331
"mimetype": "text/x-python",
331332
"name": "python",
332333
"nbconvert_exporter": "python",
333-
"pygments_lexer": "ipython2",
334-
"version": "2.7.11"
334+
"pygments_lexer": "ipython3",
335+
"version": "3.5.2"
335336
}
336337
},
337338
"nbformat": 4,

docs/source/notebooks/GLM-hierarchical.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Hierarchical Linear Regression"
7+
"# GLM: Hierarchical Linear Regression"
88
]
99
},
1010
{
@@ -550,8 +550,9 @@
550550
}
551551
],
552552
"metadata": {
553+
"anaconda-cloud": {},
553554
"kernelspec": {
554-
"display_name": "Python 3",
555+
"display_name": "Python [default]",
555556
"language": "python",
556557
"name": "python3"
557558
},
@@ -565,7 +566,7 @@
565566
"name": "python",
566567
"nbconvert_exporter": "python",
567568
"pygments_lexer": "ipython3",
568-
"version": "3.5.1"
569+
"version": "3.5.2"
569570
}
570571
},
571572
"nbformat": 4,

docs/source/notebooks/GLM-linear.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,9 @@
371371
}
372372
],
373373
"metadata": {
374+
"anaconda-cloud": {},
374375
"kernelspec": {
375-
"display_name": "Python 3",
376+
"display_name": "Python [default]",
376377
"language": "python",
377378
"name": "python3"
378379
},
@@ -386,7 +387,7 @@
386387
"name": "python",
387388
"nbconvert_exporter": "python",
388389
"pygments_lexer": "ipython3",
389-
"version": "3.5.1"
390+
"version": "3.5.2"
390391
}
391392
},
392393
"nbformat": 4,

docs/source/notebooks/GLM-logistic.ipynb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3455,8 +3455,9 @@
34553455
}
34563456
],
34573457
"metadata": {
3458+
"anaconda-cloud": {},
34583459
"kernelspec": {
3459-
"display_name": "Python 3",
3460+
"display_name": "Python [default]",
34603461
"language": "python",
34613462
"name": "python3"
34623463
},
@@ -3470,7 +3471,7 @@
34703471
"name": "python",
34713472
"nbconvert_exporter": "python",
34723473
"pygments_lexer": "ipython3",
3473-
"version": "3.5.1"
3474+
"version": "3.5.2"
34743475
}
34753476
},
34763477
"nbformat": 4,

docs/source/notebooks/GLM-model-selection.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# GLM Model Selection\n",
7+
"# GLM: Model Selection\n",
88
"\n",
99
"\n",
1010
"**A fairly minimal reproducable example of Model Selection using DIC and WAIC.**\n",
@@ -1288,8 +1288,9 @@
12881288
}
12891289
],
12901290
"metadata": {
1291+
"anaconda-cloud": {},
12911292
"kernelspec": {
1292-
"display_name": "Python 3",
1293+
"display_name": "Python [default]",
12931294
"language": "python",
12941295
"name": "python3"
12951296
},
@@ -1303,7 +1304,7 @@
13031304
"name": "python",
13041305
"nbconvert_exporter": "python",
13051306
"pygments_lexer": "ipython3",
1306-
"version": "3.5.1"
1307+
"version": "3.5.2"
13071308
}
13081309
},
13091310
"nbformat": 4,

docs/source/notebooks/GLM-poisson-regression.ipynb

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"##### PyMC3 Examples\n",
7+
"# GLM: Poisson Regression\n",
88
"\n",
9-
"# GLM Poisson Regression\n",
10-
"\n",
11-
"#### A minimal reproducable example of poisson regression to predict counts using dummy data.\n",
9+
"## A minimal reproducable example of poisson regression to predict counts using dummy data.\n",
1210
"\n",
1311
"This Notebook is basically an excuse to demo poisson regression using PyMC3, both manually and using the `glm` library to demo interactions using the `patsy` library. We will create some dummy data, poisson distributed according to a linear model, and try to recover the coefficients of that linear model through inference.\n",
1412
"\n",
@@ -72,7 +70,7 @@
7270
"cell_type": "markdown",
7371
"metadata": {},
7472
"source": [
75-
"# Setup"
73+
"## Setup"
7674
]
7775
},
7876
{
@@ -476,7 +474,7 @@
476474
"cell_type": "markdown",
477475
"metadata": {},
478476
"source": [
479-
"# Poisson Regression"
477+
"## Poisson Regression"
480478
]
481479
},
482480
{
@@ -524,7 +522,7 @@
524522
"cell_type": "markdown",
525523
"metadata": {},
526524
"source": [
527-
"## 1. Manual method, create design matrices and manually specify model"
525+
"### 1. Manual method, create design matrices and manually specify model"
528526
]
529527
},
530528
{
@@ -644,7 +642,7 @@
644642
"cell_type": "markdown",
645643
"metadata": {},
646644
"source": [
647-
"### Create Model"
645+
"#### Create Model"
648646
]
649647
},
650648
{
@@ -678,7 +676,7 @@
678676
"cell_type": "markdown",
679677
"metadata": {},
680678
"source": [
681-
"### Sample Model"
679+
"#### Sample Model"
682680
]
683681
},
684682
{
@@ -707,7 +705,7 @@
707705
"cell_type": "markdown",
708706
"metadata": {},
709707
"source": [
710-
"### View Diagnostics"
708+
"#### View Diagnostics"
711709
]
712710
},
713711
{
@@ -746,7 +744,7 @@
746744
"cell_type": "markdown",
747745
"metadata": {},
748746
"source": [
749-
"## Transform coeffs and recover theta values"
747+
"### Transform coeffs and recover theta values"
750748
]
751749
},
752750
{
@@ -878,14 +876,14 @@
878876
"cell_type": "markdown",
879877
"metadata": {},
880878
"source": [
881-
"## 2. Alternative method, using `pymc.glm`"
879+
"### 2. Alternative method, using `pymc.glm`"
882880
]
883881
},
884882
{
885883
"cell_type": "markdown",
886884
"metadata": {},
887885
"source": [
888-
"### Create Model"
886+
"#### Create Model"
889887
]
890888
},
891889
{
@@ -920,7 +918,7 @@
920918
"cell_type": "markdown",
921919
"metadata": {},
922920
"source": [
923-
"### Sample Model"
921+
"#### Sample Model"
924922
]
925923
},
926924
{
@@ -949,7 +947,7 @@
949947
"cell_type": "markdown",
950948
"metadata": {},
951949
"source": [
952-
"### View Traces"
950+
"#### View Traces"
953951
]
954952
},
955953
{
@@ -1127,8 +1125,9 @@
11271125
}
11281126
],
11291127
"metadata": {
1128+
"anaconda-cloud": {},
11301129
"kernelspec": {
1131-
"display_name": "Python 3",
1130+
"display_name": "Python [default]",
11321131
"language": "python",
11331132
"name": "python3"
11341133
},
@@ -1142,7 +1141,7 @@
11421141
"name": "python",
11431142
"nbconvert_exporter": "python",
11441143
"pygments_lexer": "ipython3",
1145-
"version": "3.5.1"
1144+
"version": "3.5.2"
11461145
}
11471146
},
11481147
"nbformat": 4,

docs/source/notebooks/GLM-robust-with-outlier-detection.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# GLM Robust Regression with Outlier Detection\n",
7+
"# GLM: Robust Regression with Outlier Detection\n",
88
"\n",
99
"**A minimal reproducable example of Robust Regression with Outlier Detection using Hogg 2010 Signal vs Noise method.**\n",
1010
"\n",
@@ -873,8 +873,9 @@
873873
}
874874
],
875875
"metadata": {
876+
"anaconda-cloud": {},
876877
"kernelspec": {
877-
"display_name": "Python 3",
878+
"display_name": "Python [default]",
878879
"language": "python",
879880
"name": "python3"
880881
},
@@ -888,7 +889,7 @@
888889
"name": "python",
889890
"nbconvert_exporter": "python",
890891
"pygments_lexer": "ipython3",
891-
"version": "3.5.1"
892+
"version": "3.5.2"
892893
}
893894
},
894895
"nbformat": 4,

docs/source/notebooks/GLM-robust.ipynb

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
{
22
"cells": [
3-
{
4-
"cell_type": "markdown",
5-
"metadata": {
6-
"toc": "true"
7-
},
8-
"source": [
9-
"# Table of Contents\n",
10-
" <p><div class=\"lev1\"><a href=\"#GLM:-Robust-Linear-Regression\"><span class=\"toc-item-num\">1&nbsp;&nbsp;</span>GLM: Robust Linear Regression</a></div><div class=\"lev2\"><a href=\"#Robust-Regression\"><span class=\"toc-item-num\">1.1&nbsp;&nbsp;</span>Robust Regression</a></div><div class=\"lev2\"><a href=\"#Summary\"><span class=\"toc-item-num\">1.2&nbsp;&nbsp;</span>Summary</a></div>"
11-
]
12-
},
133
{
144
"cell_type": "markdown",
155
"metadata": {},
166
"source": [
177
"# GLM: Robust Linear Regression\n",
188
"\n",
19-
"Author: Thomas Wiecki\n",
9+
"Author: [Thomas Wiecki](https://twitter.com/twiecki)\n",
2010
"\n",
2111
"This tutorial first appeard as a post in small series on Bayesian GLMs on my blog:\n",
2212
"\n",

0 commit comments

Comments
 (0)