|
924 | 924 | "\n", |
925 | 925 | "### Using `MAP` to improve convergence\n", |
926 | 926 | "\n", |
927 | | - "If you ran the above example yourself, you may have noticed that our results were not consistent: perhaps your cluster cluster division was more scattered, or perhaps less scattered. The problem is that our traces are a function of the *starting values* of the MCMC algorithm. \n", |
| 927 | + "If you ran the above example yourself, you may have noticed that our results were not consistent: perhaps your cluster division was more scattered, or perhaps less scattered. The problem is that our traces are a function of the *starting values* of the MCMC algorithm. \n", |
928 | 928 | "\n", |
929 | 929 | "It can be mathematically shown that letting the MCMC run long enough, by performing many steps, the algorithm *should forget its initial position*. In fact, this is what it means to say the MCMC converged (in practice though we can never achieve total convergence). Hence if we observe different posterior analysis, it is likely because our MCMC has not fully converged yet, and we should not use samples from it yet (we should use a larger burn-in period ).\n", |
930 | 930 | "\n", |
|
971 | 971 | "$$x_t \\sim \\text{Normal}(0,1), \\;\\; x_0 = 0$$\n", |
972 | 972 | "$$y_t \\sim \\text{Normal}(y_{t-1}, 1 ), \\;\\; y_0 = 0$$\n", |
973 | 973 | "\n", |
974 | | - "which has an example paths like:" |
| 974 | + "which have example paths like:" |
975 | 975 | ] |
976 | 976 | }, |
977 | 977 | { |
|
1080 | 1080 | "plt.bar(x, autocorr( y_t )[1:max_x], edgecolor=colors[0],\n", |
1081 | 1081 | " label=\"no thinning\", color = colors[0], width =1 )\n", |
1082 | 1082 | "plt.bar(x, autocorr( y_t[::2] )[1:max_x], edgecolor=colors[1],\n", |
1083 | | - " label=\"keeping every 2d sample\", color = colors[1], width=1 )\n", |
| 1083 | + " label=\"keeping every 2nd sample\", color = colors[1], width=1 )\n", |
1084 | 1084 | "plt.bar(x, autocorr( y_t[::3] )[1:max_x], width =1, edgecolor = colors[2],\n", |
1085 | 1085 | " label=\"keeping every 3rd sample\", color = colors[2] )\n", |
1086 | 1086 | "\n", |
|
0 commit comments