Skip to content

Commit b996397

Browse files
committed
reorder of comment and metadata cell
1 parent 3056dfb commit b996397

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lectures/bayes_nonconj.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ $$
295295
& =-\int q(\theta)\log\frac{\frac{p(\theta,Y)}{p(Y)}}{q(\theta)} d\theta\\
296296
& =-\int q(\theta)\log\frac{p(\theta,Y)}{p(\theta)q(Y)} d\theta\\
297297
& =-\int q(\theta)\left[\log\frac{p(\theta,Y)}{q(\theta)}-\log p(Y)\right] d\theta\\
298-
& =-\int q(\theta)\log\frac{p(\theta,Y)}{q(\theta)}+\int d\theta q(\theta)\log p(Y) d\theta\\
299-
& =-\int q(\theta)\log\frac{p(\theta,Y)}{q(\theta)}+\log p(Y) d\theta\\
298+
& =-\int q(\theta)\log\frac{p(\theta,Y)}{q(\theta)}+\int q(\theta)\log p(Y) d\theta\\
299+
& =-\int q(\theta)\log\frac{p(\theta,Y)}{q(\theta)} d\theta+\log p(Y)\\
300300
\log p(Y)&=D_{KL}(q(\theta;\phi)\;\|\;p(\theta\mid Y))+\int q_{\phi}(\theta)\log\frac{p(\theta,Y)}{q_{\phi}(\theta)} d\theta
301301
\end{aligned}
302302
$$
@@ -563,14 +563,14 @@ The above graphs show that sampling seems to work well with both distributions.
563563
Now let's see how well things work with von Mises distributions.
564564
565565
```{code-cell} ipython3
566-
# shifted von Mises
567566
---
568567
mystnb:
569568
figure:
570569
caption: |
571570
Shifted von Mises distribution
572571
name: fig_vonmises_dist
573572
---
573+
# shifted von Mises
574574
exampleVM = BayesianInference(param=10, name_dist="vonMises")
575575
exampleVM.show_prior(size=100000, bins=20)
576576
```
@@ -815,8 +815,8 @@ BayesianInferencePlot(true_theta, num_list, BETA).MCMC_plot(
815815
mystnb:
816816
figure:
817817
caption: |
818-
SVI density with Beta guide
819-
name: fig_svi_beta
818+
SVI density with Beta prior and Beta guide
819+
name: fig_svi_beta_beta
820820
---
821821
822822
BayesianInferencePlot(true_theta, num_list, BETA).SVI_plot(
@@ -1061,14 +1061,14 @@ BayesianInferencePlot(true_theta, num_list, example_CLASS).SVI_plot(
10611061
```
10621062
10631063
```{code-cell} ipython3
1064-
# von Mises
10651064
---
10661065
mystnb:
10671066
figure:
10681067
caption: |
10691068
SVI density with von Mises prior and Beta guide
10701069
name: fig_svi_vonmises_beta
10711070
---
1071+
# von Mises
10721072
example_CLASS = VONMISES
10731073
print(
10741074
f"=======INFO=======\nParameters: {example_CLASS.param}\nPrior Dist: {example_CLASS.name_dist}"

0 commit comments

Comments
 (0)