Skip to content

Commit cc193b2

Browse files
Harivallabhatwiecki
authored andcommitted
Fix a couple of typos and add links for further reading (#3442)
1 parent 3af585b commit cc193b2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/source/notebooks/dp_mix.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"\n",
1616
"Here $P_0$ is the base probability measure on the space $\\Omega$. The precision parameter $\\alpha > 0$ controls how close samples from the Dirichlet process are to the base measure, $P_0$. As $\\alpha \\to \\infty$, samples from the Dirichlet process approach the base measure $P_0$.\n",
1717
"\n",
18-
"Dirichlet processes have several properties that make then quite suitable to [MCMC](https://en.wikipedia.org/wiki/Markov_chain_Monte_Carlo) simulation.\n",
18+
"Dirichlet processes have several properties that make them quite suitable to [MCMC](https://en.wikipedia.org/wiki/Markov_chain_Monte_Carlo) simulation.\n",
1919
"\n",
2020
"1. The posterior given [i.i.d.](https://en.wikipedia.org/wiki/Independent_and_identically_distributed_random_variables) observations $\\omega_1, \\ldots, \\omega_n$ from a Dirichlet process $P \\sim \\textrm{DP}(\\alpha, P_0)$ is also a Dirichlet process with\n",
2121
"\n",
@@ -41,13 +41,15 @@
4141
"\n",
4242
" $$P = \\sum_{i = 1}^\\infty w_i \\delta_{\\omega_i}.$$\n",
4343
"\n",
44-
"3. The [stick-breaking process](https://en.wikipedia.org/wiki/Dirichlet_process#The_stick-breaking_process) gives an explicit construction of the weights $w_i$ and samples $\\omega_i$ above that is straightforward to sample from. If $\\beta_1, \\beta_2, \\ldots \\sim \\textrm{Beta}(1, \\alpha)$, then $w_i = \\beta_i \\prod_{j = 1}^{j - 1} (1 - \\beta_j)$. The relationship between this representation and stick breaking may be illustrated as follows:\n",
44+
"3. The [stick-breaking process](https://en.wikipedia.org/wiki/Dirichlet_process#The_stick-breaking_process) gives an explicit construction of the weights $w_i$ and samples $\\omega_i$ above that is straightforward to sample from. If $\\beta_1, \\beta_2, \\ldots \\sim \\textrm{Beta}(1, \\alpha)$, then $w_i = \\beta_i \\prod_{j = 1}^{n - 1} (1 - \\beta_j)$. The relationship between this representation and stick breaking may be illustrated as follows:\n",
4545
" 1. Start with a stick of length one.\n",
4646
" 2. Break the stick into two portions, the first of proportion $w_1 = \\beta_1$ and the second of proportion $1 - w_1$.\n",
4747
" 3. Further break the second portion into two portions, the first of proportion $\\beta_2$ and the second of proportion $1 - \\beta_2$. The length of the first portion of this stick is $\\beta_2 (1 - \\beta_1)$; the length of the second portion is $(1 - \\beta_1) (1 - \\beta_2)$.\n",
4848
" 4. Continue breaking the second portion from the previous break in this manner forever. If $\\omega_1, \\omega_2, \\ldots \\sim P_0$, then\n",
4949
"\n",
5050
" $$P = \\sum_{i = 1}^\\infty w_i \\delta_{\\omega_i} \\sim \\textrm{DP}(\\alpha, P_0).$$\n",
51+
" \n",
52+
"[Suggested Further Reading]: (http://mlg.eng.cam.ac.uk/tutorials/07/ywt.pdf) and (https://www.stats.ox.ac.uk/~teh/research/npbayes/Teh2010a.pdf) for a brief introduction to other flavours of Dirichlet Processes, and their applications.\n",
5153
"\n",
5254
"We can use the stick-breaking process above to easily sample from a Dirichlet process in Python. For this example, $\\alpha = 2$ and the base distribution is $N(0, 1)$."
5355
]
@@ -1158,7 +1160,7 @@
11581160
"name": "python",
11591161
"nbconvert_exporter": "python",
11601162
"pygments_lexer": "ipython3",
1161-
"version": "3.5.4"
1163+
"version": "3.6.7"
11621164
},
11631165
"widgets": {
11641166
"state": {},

0 commit comments

Comments
 (0)