diff --git a/Chapter3_MCMC/IntroMCMC.ipynb b/Chapter3_MCMC/IntroMCMC.ipynb index 216769df..c370004e 100644 --- a/Chapter3_MCMC/IntroMCMC.ipynb +++ b/Chapter3_MCMC/IntroMCMC.ipynb @@ -213,7 +213,7 @@ "plt.ylim( 0, 5)\n", "\n", "subplot(222)\n", - "exp_x = stats.expon.pdf( x,loc=0, scale = 3)\n", + "exp_x = stats.expon.pdf(x, loc=0, scale = 3)\n", "exp_y = stats.expon.pdf(x, loc=0, scale = 10)\n", "M = np.dot( exp_x[:,None], exp_y[None,:] )\n", "\n", @@ -257,7 +257,7 @@ "\n", "The black dot represents the true parameters. Even with 1 sample point, the mountains attempts to contain the true parameter. Of course, inference with a sample size of 1 is incredibly naive, and choosing such a small sample size was only illustrative. \n", "\n", - "It's a great exercise to try changing the sample size to other values (try 2,5,10,100?...) and observing how out \"mountain\" posterior changes. " + "It's a great exercise to try changing the sample size to other values (try 2,5,10,100?...) and observing how our \"mountain\" posterior changes. " ] }, { @@ -266,7 +266,7 @@ "source": [ "### Exploring the landscape using the MCMC\n", "\n", - "We should explore the deformed posterior space generated by our prior surface and observed data to find the posterior mountain. However, we cannot naively search the space: any computer scientist will tell you that traversing $N$-dimensional space is exponentially difficult in $N$: the size of the space quickly blows-up as we increase $N$ (see [the curse of dimensionality](http://en.wikipedia.org/wiki/Curse_of_dimensionality) ). What hope do we have to find these hidden mountains? The idea behind MCMC is to perform an intelligent search of the space. To say \"search\" implies we are looking for a particular point, which is perhaps not an accurate as we are really looking for a broad mountain. \n", + "We should explore the deformed posterior space generated by our prior surface and observed data to find the posterior mountain. However, we cannot naively search the space: any computer scientist will tell you that traversing $N$-dimensional space is exponentially difficult in $N$: the size of the space quickly blows-up as we increase $N$ (see [the curse of dimensionality](http://en.wikipedia.org/wiki/Curse_of_dimensionality)). What hope do we have to find these hidden mountains? The idea behind MCMC is to perform an intelligent search of the space. To say \"search\" implies we are looking for a particular point, which is perhaps not an accurate as we are really looking for a broad mountain. \n", "\n", "Recall that MCMC returns *samples* from the posterior distribution, not the distribution itself. Stretching our mountainous analogy to its limit, MCMC performs a task similar to repeatedly asking \"How likely is this pebble I found to be from the mountain I am searching for?\", and completes its task by returning thousands of accepted pebbles in hopes of reconstructing the original mountain. In MCMC and PyMC lingo, the returned sequence of \"pebbles\" are the samples, cumulatively called the *traces*. \n", "\n", @@ -1345,4 +1345,4 @@ "metadata": {} } ] -} \ No newline at end of file +}