Skip to content

Release 0.2.4 #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,18 @@ Plain text

```
Y. Nakahara, N. Ichijo, K. Shimada, Y. Iikubo,
S. Saito, K. Kazama, T. Matsushima, BayesML Developers, ``BayesML 0.2.3,''
S. Saito, K. Kazama, T. Matsushima, BayesML Developers, ``BayesML 0.2.4,''
[Online] https://github.com/yuta-nakahara/BayesML
```

BibTeX

``` bibtex
@misc{bayesml,
author = {Nakahara Yuta and Ichijo Naoki and Shimada Koshi and
Iikubo Yuji and Saito Shota and Kazama Koki and
Matsushima Toshiyasu and {BayesML Developers}},
title = {BayesML 0.2.3},
author = {Nakahara, Yuta and Ichijo, Naoki and Shimada, Koshi and
Iikubo, Yuji and Saito, Shota and Kazama, Koki and
Matsushima, Toshiyasu and {BayesML Developers}},
title = {BayesML 0.2.4},
howpublished = {\url{https://github.com/yuta-nakahara/BayesML}},
year = {2022}
}
Expand Down
10 changes: 5 additions & 5 deletions README_jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,18 @@ BayesMLへのコントリビューションを考えてくださってありが

```
Y. Nakahara, N. Ichijo, K. Shimada, Y. Iikubo,
S. Saito, K. Kazama, T. Matsushima, BayesML Developers, ``BayesML 0.2.3,''
S. Saito, K. Kazama, T. Matsushima, BayesML Developers, ``BayesML 0.2.4,''
[Online] https://github.com/yuta-nakahara/BayesML
```

BibTeX

``` bibtex
@misc{bayesml,
author = {Nakahara Yuta and Ichijo Naoki and Shimada Koshi and
Iikubo Yuji and Saito Shota and Kazama Koki and
Matsushima Toshiyasu and {BayesML Developers}},
title = {BayesML 0.2.3},
author = {Nakahara, Yuta and Ichijo, Naoki and Shimada, Koshi and
Iikubo, Yuji and Saito, Shota and Kazama, Koki and
Matsushima, Toshiyasu and {BayesML Developers}},
title = {BayesML 0.2.4},
howpublished = {\url{https://github.com/yuta-nakahara/BayesML}},
year = {2022}
}
Expand Down
10 changes: 5 additions & 5 deletions doc/developers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Plain text
.. code-block::

Y. Nakahara, N. Ichijo, K. Shimada, Y. Iikubo,
S. Saito, K. Kazama, T. Matsushima, BayesML Developers, ``BayesML 0.2.3,''
S. Saito, K. Kazama, T. Matsushima, BayesML Developers, ``BayesML 0.2.4,''
[Online] https://github.com/yuta-nakahara/BayesML


Expand All @@ -68,10 +68,10 @@ BibTeX
.. code-block:: bibtex

@misc{bayesml,
author = {Nakahara Yuta and Ichijo Naoki and Shimada Koshi and
Iikubo Yuji and Saito Shota and Kazama Koki and
Matsushima Toshiyasu and {BayesML Developers}},
title = {BayesML 0.2.3},
author = {Nakahara, Yuta and Ichijo, Naoki and Shimada, Koshi and
Iikubo, Yuji and Saito, Shota and Kazama, Koki and
Matsushima, Toshiyasu and {BayesML Developers}},
title = {BayesML 0.2.4},
howpublished = {\url{https://github.com/yuta-nakahara/BayesML}},
year = {2022}
}
10 changes: 5 additions & 5 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Plain text
.. code-block::

Y. Nakahara, N. Ichijo, K. Shimada, Y. Iikubo,
S. Saito, K. Kazama, T. Matsushima, BayesML Developers, ``BayesML 0.2.3,''
S. Saito, K. Kazama, T. Matsushima, BayesML Developers, ``BayesML 0.2.4,''
[Online] https://github.com/yuta-nakahara/BayesML


Expand All @@ -159,10 +159,10 @@ BibTeX
.. code-block:: bibtex

@misc{bayesml,
author = {Nakahara Yuta and Ichijo Naoki and Shimada Koshi and
Iikubo Yuji and Saito Shota and Kazama Koki and
Matsushima Toshiyasu and {BayesML Developers}},
title = {BayesML 0.2.3},
author = {Nakahara, Yuta and Ichijo, Naoki and Shimada, Koshi and
Iikubo, Yuji and Saito, Shota and Kazama, Koki and
Matsushima, Toshiyasu and {BayesML Developers}},
title = {BayesML 0.2.4},
howpublished = {\url{https://github.com/yuta-nakahara/BayesML}},
year = {2022}
}
Expand Down
10 changes: 5 additions & 5 deletions docs/_sources/developers.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Plain text
.. code-block::

Y. Nakahara, N. Ichijo, K. Shimada, Y. Iikubo,
S. Saito, K. Kazama, T. Matsushima, BayesML Developers, ``BayesML 0.2.1,''
S. Saito, K. Kazama, T. Matsushima, BayesML Developers, ``BayesML 0.2.4,''
[Online] https://github.com/yuta-nakahara/BayesML


Expand All @@ -68,10 +68,10 @@ BibTeX
.. code-block:: bibtex

@misc{bayesml,
author = {Nakahara Yuta and Ichijo Naoki and Shimada Koshi and
Iikubo Yuji and Saito Shota and Kazama Koki and
Matsushima Toshiyasu and {BayesML Developers}},
title = {BayesML 0.2.1},
author = {Nakahara, Yuta and Ichijo, Naoki and Shimada, Koshi and
Iikubo, Yuji and Saito, Shota and Kazama, Koki and
Matsushima, Toshiyasu and {BayesML Developers}},
title = {BayesML 0.2.4},
howpublished = {\url{https://github.com/yuta-nakahara/BayesML}},
year = {2022}
}
10 changes: 5 additions & 5 deletions docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Plain text
.. code-block::

Y. Nakahara, N. Ichijo, K. Shimada, Y. Iikubo,
S. Saito, K. Kazama, T. Matsushima, BayesML Developers, ``BayesML 0.2.1,''
S. Saito, K. Kazama, T. Matsushima, BayesML Developers, ``BayesML 0.2.4,''
[Online] https://github.com/yuta-nakahara/BayesML


Expand All @@ -159,10 +159,10 @@ BibTeX
.. code-block:: bibtex

@misc{bayesml,
author = {Nakahara Yuta and Ichijo Naoki and Shimada Koshi and
Iikubo Yuji and Saito Shota and Kazama Koki and
Matsushima Toshiyasu and {BayesML Developers}},
title = {BayesML 0.2.1},
author = {Nakahara, Yuta and Ichijo, Naoki and Shimada, Koshi and
Iikubo, Yuji and Saito, Shota and Kazama, Koki and
Matsushima, Toshiyasu and {BayesML Developers}},
title = {BayesML 0.2.4},
howpublished = {\url{https://github.com/yuta-nakahara/BayesML}},
year = {2022}
}
Expand Down
59 changes: 38 additions & 21 deletions docs/bayesml.bernoulli.html
Original file line number Diff line number Diff line change
Expand Up @@ -596,61 +596,64 @@ <h1>bayesml.bernoulli package<a class="headerlink" href="#bayesml-bernoulli-pack
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.calc_pred_dist" title="bayesml.bernoulli.LearnModel.calc_pred_dist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">calc_pred_dist</span></code></a>()</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.calc_log_marginal_likelihood" title="bayesml.bernoulli.LearnModel.calc_log_marginal_likelihood"><code class="xref py py-obj docutils literal notranslate"><span class="pre">calc_log_marginal_likelihood</span></code></a>()</p></td>
<td><p>Calculate log marginal likelihood</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.calc_pred_dist" title="bayesml.bernoulli.LearnModel.calc_pred_dist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">calc_pred_dist</span></code></a>()</p></td>
<td><p>Calculate the parameters of the predictive distribution.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.estimate_interval" title="bayesml.bernoulli.LearnModel.estimate_interval"><code class="xref py py-obj docutils literal notranslate"><span class="pre">estimate_interval</span></code></a>([credibility])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.estimate_interval" title="bayesml.bernoulli.LearnModel.estimate_interval"><code class="xref py py-obj docutils literal notranslate"><span class="pre">estimate_interval</span></code></a>([credibility])</p></td>
<td><p>Credible interval of the parameter.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.estimate_params" title="bayesml.bernoulli.LearnModel.estimate_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">estimate_params</span></code></a>([loss, dict_out])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.estimate_params" title="bayesml.bernoulli.LearnModel.estimate_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">estimate_params</span></code></a>([loss, dict_out])</p></td>
<td><p>Estimate the parameter of the stochastic data generative model under the given criterion.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.get_constants" title="bayesml.bernoulli.LearnModel.get_constants"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_constants</span></code></a>()</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.get_constants" title="bayesml.bernoulli.LearnModel.get_constants"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_constants</span></code></a>()</p></td>
<td><p>Get constants of LearnModel.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.get_h0_params" title="bayesml.bernoulli.LearnModel.get_h0_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_h0_params</span></code></a>()</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.get_h0_params" title="bayesml.bernoulli.LearnModel.get_h0_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_h0_params</span></code></a>()</p></td>
<td><p>Get the initial values of the hyperparameters of the posterior distribution.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.get_hn_params" title="bayesml.bernoulli.LearnModel.get_hn_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_hn_params</span></code></a>()</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.get_hn_params" title="bayesml.bernoulli.LearnModel.get_hn_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_hn_params</span></code></a>()</p></td>
<td><p>Get the hyperparameters of the posterior distribution.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.get_p_params" title="bayesml.bernoulli.LearnModel.get_p_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_p_params</span></code></a>()</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.get_p_params" title="bayesml.bernoulli.LearnModel.get_p_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_p_params</span></code></a>()</p></td>
<td><p>Get the parameters of the predictive distribution.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">load_h0_params</span></code>(filename)</p></td>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">load_h0_params</span></code>(filename)</p></td>
<td><p>Load the hyperparameters to h0_params.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">load_hn_params</span></code>(filename)</p></td>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">load_hn_params</span></code>(filename)</p></td>
<td><p>Load the hyperparameters to hn_params.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.make_prediction" title="bayesml.bernoulli.LearnModel.make_prediction"><code class="xref py py-obj docutils literal notranslate"><span class="pre">make_prediction</span></code></a>([loss])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.make_prediction" title="bayesml.bernoulli.LearnModel.make_prediction"><code class="xref py py-obj docutils literal notranslate"><span class="pre">make_prediction</span></code></a>([loss])</p></td>
<td><p>Predict a new data point under the given criterion.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">overwrite_h0_params</span></code>()</p></td>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">overwrite_h0_params</span></code>()</p></td>
<td><p>Overwrite the initial values of the hyperparameters of the posterior distribution by the learned values.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.pred_and_update" title="bayesml.bernoulli.LearnModel.pred_and_update"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pred_and_update</span></code></a>(x[, loss])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.pred_and_update" title="bayesml.bernoulli.LearnModel.pred_and_update"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pred_and_update</span></code></a>(x[, loss])</p></td>
<td><p>Predict a new data point and update the posterior sequentially.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">reset_hn_params</span></code>()</p></td>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">reset_hn_params</span></code>()</p></td>
<td><p>Reset the hyperparameters of the posterior distribution to their initial values.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_h0_params</span></code>(filename)</p></td>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_h0_params</span></code>(filename)</p></td>
<td><p>Save the hyperparameters using python <code class="docutils literal notranslate"><span class="pre">pickle</span></code> module.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_hn_params</span></code>(filename)</p></td>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_hn_params</span></code>(filename)</p></td>
<td><p>Save the hyperparameters using python <code class="docutils literal notranslate"><span class="pre">pickle</span></code> module.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.set_h0_params" title="bayesml.bernoulli.LearnModel.set_h0_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_h0_params</span></code></a>([h0_alpha, h0_beta])</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.set_h0_params" title="bayesml.bernoulli.LearnModel.set_h0_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_h0_params</span></code></a>([h0_alpha, h0_beta])</p></td>
<td><p>Set initial values of the hyperparameter of the posterior distribution.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.set_hn_params" title="bayesml.bernoulli.LearnModel.set_hn_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_hn_params</span></code></a>([hn_alpha, hn_beta])</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.set_hn_params" title="bayesml.bernoulli.LearnModel.set_hn_params"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_hn_params</span></code></a>([hn_alpha, hn_beta])</p></td>
<td><p>Set updated values of the hyperparameter of the posterior distribution.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.update_posterior" title="bayesml.bernoulli.LearnModel.update_posterior"><code class="xref py py-obj docutils literal notranslate"><span class="pre">update_posterior</span></code></a>(x)</p></td>
<tr class="row-odd"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.update_posterior" title="bayesml.bernoulli.LearnModel.update_posterior"><code class="xref py py-obj docutils literal notranslate"><span class="pre">update_posterior</span></code></a>(x)</p></td>
<td><p>Update the hyperparameters of the posterior distribution using traning data.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.visualize_posterior" title="bayesml.bernoulli.LearnModel.visualize_posterior"><code class="xref py py-obj docutils literal notranslate"><span class="pre">visualize_posterior</span></code></a>()</p></td>
<tr class="row-even"><td><p><a class="reference internal" href="#bayesml.bernoulli.LearnModel.visualize_posterior" title="bayesml.bernoulli.LearnModel.visualize_posterior"><code class="xref py py-obj docutils literal notranslate"><span class="pre">visualize_posterior</span></code></a>()</p></td>
<td><p>Visualize the posterior distribution for the parameter.</p></td>
</tr>
</tbody>
Expand Down Expand Up @@ -776,8 +779,8 @@ <h1>bayesml.bernoulli package<a class="headerlink" href="#bayesml-bernoulli-pack
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<dl class="simple">
<dt><a class="reference external" href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.rv_continuous.html#scipy.stats.rv_continuous" title="(in SciPy v1.10.0)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">scipy.stats.rv_continuous</span></code></a></dt><dd></dd>
<dt><a class="reference external" href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.rv_discrete.html#scipy.stats.rv_discrete" title="(in SciPy v1.10.0)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">scipy.stats.rv_discrete</span></code></a></dt><dd></dd>
<dt><a class="reference external" href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.rv_continuous.html#scipy.stats.rv_continuous" title="(in SciPy v1.10.1)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">scipy.stats.rv_continuous</span></code></a></dt><dd></dd>
<dt><a class="reference external" href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.rv_discrete.html#scipy.stats.rv_discrete" title="(in SciPy v1.10.1)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">scipy.stats.rv_discrete</span></code></a></dt><dd></dd>
</dl>
</div>
</dd></dl>
Expand Down Expand Up @@ -890,6 +893,20 @@ <h1>bayesml.bernoulli package<a class="headerlink" href="#bayesml-bernoulli-pack
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="bayesml.bernoulli.LearnModel.calc_log_marginal_likelihood">
<span class="sig-name descname"><span class="pre">calc_log_marginal_likelihood</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#bayesml.bernoulli.LearnModel.calc_log_marginal_likelihood" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate log marginal likelihood</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>log_marginal_likelihood</strong><span class="classifier">float</span></dt><dd><p>The log marginal likelihood.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

</div>
Expand Down
Loading