Skip to content

Commit

Permalink
Merge pull request #78 from yuta-nakahara/fix/docs-typo-in-normal
Browse files Browse the repository at this point in the history
Update bayesml.normal.html
  • Loading branch information
yuta-nakahara authored Sep 19, 2023
2 parents 7846889 + 403d689 commit b1e5c79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bayesml/normal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
.. math::
\mathbb{E}[\mu] &= m_0 & \left( \alpha_0 > \frac{1}{2} \right), \\
\mathbb{V}[\mu] &= \frac{\beta_0 \alpha_0}{\alpha_0 (\alpha_0 - 1)} & (\alpha_0 > 1), \\
\mathbb{V}[\mu] &= \frac{\beta_0}{\kappa_0 (\alpha_0 - 1)} & (\alpha_0 > 1), \\
\mathbb{E}[\tau] &= \frac{\alpha_0}{\beta_0}, \\
\mathbb{V}[\tau] &= \frac{\alpha_0}{\beta_0^2}.
Expand All @@ -55,7 +55,7 @@
.. math::
\mathbb{E}[\mu | x^n] &= m_n & \left( \alpha_n > \frac{1}{2} \right), \\
\mathbb{V}[\mu | x^n] &= \frac{\beta_n \alpha_n}{\alpha_n (\alpha_n - 1)} & (\alpha_n > 1), \\
\mathbb{V}[\mu | x^n] &= \frac{\beta_n}{\kappa_n (\alpha_n - 1)} & (\alpha_n > 1), \\
\mathbb{E}[\tau | x^n] &= \frac{\alpha_n}{\beta_n}, \\
\mathbb{V}[\tau | x^n] &= \frac{\alpha_n}{\beta_n^2},
Expand Down
6 changes: 3 additions & 3 deletions docs/bayesml.normal.html
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ <h1>bayesml.normal package<a class="headerlink" href="#bayesml-normal-package" t
&amp;= \sqrt{\frac{\kappa_0 \tau}{2\pi}} \exp \left\{ -\frac{\kappa_0 \tau}{2}(\mu-m_0)^2 \right\} \frac{\beta_0^{\alpha_0}}{\Gamma (\alpha_0)} \tau^{\alpha_0 - 1} \exp \{ -\beta_0 \tau \},\end{split}\]</div>
<div class="math notranslate nohighlight">
\[\begin{split}\mathbb{E}[\mu] &amp;= m_0 &amp; \left( \alpha_0 &gt; \frac{1}{2} \right), \\
\mathbb{V}[\mu] &amp;= \frac{\beta_0 \alpha_0}{\alpha_0 (\alpha_0 - 1)} &amp; (\alpha_0 &gt; 1), \\
\mathbb{V}[\mu] &amp;= \frac{\beta_0}{\kappa_0 (\alpha_0 - 1)} &amp; (\alpha_0 &gt; 1), \\
\mathbb{E}[\tau] &amp;= \frac{\alpha_0}{\beta_0}, \\
\mathbb{V}[\tau] &amp;= \frac{\alpha_0}{\beta_0^2}.\end{split}\]</div>
<p>The posterior distribution is as follows:</p>
Expand All @@ -327,7 +327,7 @@ <h1>bayesml.normal package<a class="headerlink" href="#bayesml-normal-package" t
&amp;= \sqrt{\frac{\kappa_n \tau}{2\pi}} \exp \left\{ -\frac{\kappa_n \tau}{2}(\mu-m_n)^2 \right\} \frac{\beta_n^{\alpha_n}}{\Gamma (\alpha_n)} \tau^{\alpha_n - 1} \exp \{ -\beta_n \tau \},\end{split}\]</div>
<div class="math notranslate nohighlight">
\[\begin{split}\mathbb{E}[\mu | x^n] &amp;= m_n &amp; \left( \alpha_n &gt; \frac{1}{2} \right), \\
\mathbb{V}[\mu | x^n] &amp;= \frac{\beta_n \alpha_n}{\alpha_n (\alpha_n - 1)} &amp; (\alpha_n &gt; 1), \\
\mathbb{V}[\mu | x^n] &amp;= \frac{\beta_n}{\kappa_n (\alpha_n - 1)} &amp; (\alpha_n &gt; 1), \\
\mathbb{E}[\tau | x^n] &amp;= \frac{\alpha_n}{\beta_n}, \\
\mathbb{V}[\tau | x^n] &amp;= \frac{\alpha_n}{\beta_n^2},\end{split}\]</div>
<p>where the updating rule of the hyperparameters is</p>
Expand Down Expand Up @@ -1010,4 +1010,4 @@ <h1>bayesml.normal package<a class="headerlink" href="#bayesml-normal-package" t
<script src="_static/js/index.be7d3bbb2ef33a8344ce.js"></script>

</body>
</html>
</html>

0 comments on commit b1e5c79

Please sign in to comment.