Skip to content

Commit e675be3

Browse files
Merge pull request #8 from yuta-nakahara/develop-web_pages
Update website files
2 parents 6dfa140 + 5c4f2f4 commit e675be3

16 files changed

+74
-400
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ BayesML has the following characteristics.
1717
* Many of our learning algorithms are much faster than general-purpose Bayesian learning algorithms such as MCMC methods because they effectively use the conjugate property of a probabilistic data generative model and a prior distribution. Moreover, they are suitable for online learning.
1818
* All packages have methods to visualize the probabilistic data generative model, generated data from that model, and the posterior distribution learned from the data in 2~3 dimensional space. Thus, you can effectively understand the characteristics of probabilistic data generative models and algorithms through the generation of synthetic data and learning from them.
1919

20+
For more details, see our [website](https://yuta-nakahara.github.io/BayesML/ "BayesML's Documentation").
21+
2022
## Installation
2123

2224
Please use the following commands to install BayesML.
@@ -107,14 +109,14 @@ Different settings of a loss function yield different optimal estimates.
107109

108110
The following packages are currently available. In this library, a probabilistic data generative model, prior distribution, posterior distribution (or approximate posterior distribution), and predictive distribution (or approximate predictive distribution) are collectively called a model.
109111

110-
* Bernoulli model
111-
* Categorical model
112-
* Poisson model
113-
* Normal model
114-
* Multivariate normal model
115-
* Exponential model
116-
* Linear regression model
117-
* Autoregressive model
112+
* [Bernoulli model](https://yuta-nakahara.github.io/BayesML/bayesml.bernoulli.html, "Bayesml Bernoulli Model")
113+
* [Categorical model](https://yuta-nakahara.github.io/BayesML/bayesml.categorical.html "BayesML Categorical Model")
114+
* [Poisson model](https://yuta-nakahara.github.io/BayesML/bayesml.poisson.html, "BayesML Poisson Model")
115+
* [Normal model](https://yuta-nakahara.github.io/BayesML/bayesml.normal.html, "BayesML Normal Model")
116+
* [Multivariate normal model](https://yuta-nakahara.github.io/BayesML/bayesml.multivariate_normal.html "BayesML Multivariate Normal Model")
117+
* [Exponential model](https://yuta-nakahara.github.io/BayesML/bayesml.exponential.html "BayesML Exponential Model")
118+
* [Linear regression model](https://yuta-nakahara.github.io/BayesML/bayesml.linearregression.html "BayesML Lenear Regression Model")
119+
* [Autoregressive model](https://yuta-nakahara.github.io/BayesML/bayesml.autoregressive.html "BayesML Autoregressive Model")
118120

119121
In the future, we will add packages to deal with a mixture normal model and a hidden Markov model, which are difficult to perform exact Bayesian inference, by using variational Bayes methods.
120122

README_jp.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ BayesMLは以下の特徴を持っています.
1616
* 学習アルゴリズムの多くはデータ生成確率モデルと事前分布の共役性を効果的に用いているため,MCMC法などの汎用的なベイズ学習アルゴリズムと比べて非常に高速で,オンライン学習にも適しています.
1717
* 2~3次元空間上で,データ生成確率モデル,生成された人工データ,学習された事後分布を可視化するメソッドが全てのパッケージに備わっています.そのため,人工データの生成と学習を通じて確率モデル,アルゴリズムの特性を効果的に把握することができます.
1818

19+
詳細は[Webサイト](https://yuta-nakahara.github.io/BayesML/ "BayesML's Documentation")をご覧ください.
20+
1921
## インストール
2022

2123
以下のコマンドによりインストール可能です.
@@ -104,14 +106,14 @@ print(learn_model.estimate_params(loss='0-1'))
104106

105107
現在,以下のモデルに関するパッケージが利用可能です.本ライブラリでは,データ生成確率モデル,事前分布,事後分布(または近似事後分布),予測分布(または近似予測分布)を合わせてモデルと呼んでいます.
106108

107-
* ベルヌーイモデル
108-
* カテゴリカルモデル
109-
* ポアソンモデル
110-
* 正規モデル
111-
* 多変量正規モデル
112-
* 指数モデル
113-
* 線形回帰モデル
114-
* 自己回帰モデル
109+
* [ベルヌーイモデル](https://yuta-nakahara.github.io/BayesML/bayesml.bernoulli.html, "Bayesml Bernoulli Model")
110+
* [カテゴリカルモデル](https://yuta-nakahara.github.io/BayesML/bayesml.categorical.html "BayesML Categorical Model")
111+
* [ポアソンモデル](https://yuta-nakahara.github.io/BayesML/bayesml.poisson.html, "BayesML Poisson Model")
112+
* [正規モデル](https://yuta-nakahara.github.io/BayesML/bayesml.normal.html, "BayesML Normal Model")
113+
* [多変量正規モデル](https://yuta-nakahara.github.io/BayesML/bayesml.multivariate_normal.html "BayesML Multivariate Normal Model")
114+
* [指数モデル](https://yuta-nakahara.github.io/BayesML/bayesml.exponential.html "BayesML Exponential Model")
115+
* [線形回帰モデル](https://yuta-nakahara.github.io/BayesML/bayesml.linearregression.html "BayesML Lenear Regression Model")
116+
* [自己回帰モデル](https://yuta-nakahara.github.io/BayesML/bayesml.autoregressive.html "BayesML Autoregressive Model")
115117

116118
また,今後は混合正規モデルや隠れマルコフモデルなどの厳密なベイズ推論が困難なモデルを変分ベイズ法で学習するパッケージが追加される予定です.
117119

bayesml/autoregressive/_autoregressive.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def set_h_params(self,**kwargs):
126126
**kwargs
127127
a python dictionary {'h_mu_vec':ndarray, 'h_lambda_mat':ndarray, 'h_alpha':float, 'h_beta':float} or
128128
{'h0_mu_vec':ndarray, 'h0_lambda_mat':ndarray, 'h0_alpha':float, 'h0_beta':float}
129-
or {'hn_mu_vec':ndarray, 'hn_lambda_mat':ndarray, 'hn_alpha':float, 'hn_beta':float}
129+
or {'hn_mu_vec':ndarray, 'hn_lambda_mat':ndarray, 'hn_alpha':float, 'hn_beta':float}
130130
They are obtained by ``get_h_params()`` of GenModel,
131131
``get_h0_params`` of LearnModel or ``get_hn_params`` of LearnModel.
132132
"""
@@ -412,7 +412,7 @@ def set_h0_params(self,**kwargs):
412412
**kwargs
413413
a python dictionary {'h_mu_vec':ndarray, 'h_lambda_mat':ndarray, 'h_alpha':float, 'h_beta':float} or
414414
{'h0_mu_vec':ndarray, 'h0_lambda_mat':ndarray, 'h0_alpha':float, 'h0_beta':float}
415-
or {'hn_mu_vec':ndarray, 'hn_lambda_mat':ndarray, 'hn_alpha':float, 'hn_beta':float}
415+
or {'hn_mu_vec':ndarray, 'hn_lambda_mat':ndarray, 'hn_alpha':float, 'hn_beta':float}
416416
They are obtained by ``get_h_params()`` of GenModel,
417417
``get_h0_params`` of LearnModel or ``get_hn_params`` of LearnModel.
418418
"""
@@ -483,7 +483,7 @@ def set_hn_params(self,**kwargs):
483483
**kwargs
484484
a python dictionary {'h_mu_vec':ndarray, 'h_lambda_mat':ndarray, 'h_alpha':float, 'h_beta':float} or
485485
{'h0_mu_vec':ndarray, 'h0_lambda_mat':ndarray, 'h0_alpha':float, 'h0_beta':float}
486-
or {'hn_mu_vec':ndarray, 'hn_lambda_mat':ndarray, 'hn_alpha':float, 'hn_beta':float}
486+
or {'hn_mu_vec':ndarray, 'hn_lambda_mat':ndarray, 'hn_alpha':float, 'hn_beta':float}
487487
They are obtained by ``get_h_params()`` of GenModel,
488488
``get_h0_params`` of LearnModel or ``get_hn_params`` of LearnModel.
489489
"""

bayesml/linearregression/_linearregression.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def set_h_params(self,**kwargs):
123123
**kwargs
124124
a python dictionary {'h_mu_vec':ndarray, 'h_lambda_mat':ndarray, 'h_alpha':float, 'h_beta':float} or
125125
{'h0_mu_vec':ndarray, 'h0_lambda_mat':ndarray, 'h0_alpha':float, 'h0_beta':float}
126-
or {'hn_mu_vec':ndarray, 'hn_lambda_mat':ndarray, 'hn_alpha':float, 'hn_beta':float}
126+
or {'hn_mu_vec':ndarray, 'hn_lambda_mat':ndarray, 'hn_alpha':float, 'hn_beta':float}
127127
They are obtained by ``get_h_params()`` of GenModel,
128128
``get_h0_params`` of LearnModel or ``get_hn_params`` of LearnModel.
129129
"""
@@ -449,7 +449,7 @@ def set_h0_params(self,**kwargs):
449449
**kwargs
450450
a python dictionary {'h_mu_vec':ndarray, 'h_lambda_mat':ndarray, 'h_alpha':float, 'h_beta':float} or
451451
{'h0_mu_vec':ndarray, 'h0_lambda_mat':ndarray, 'h0_alpha':float, 'h0_beta':float}
452-
or {'hn_mu_vec':ndarray, 'hn_lambda_mat':ndarray, 'hn_alpha':float, 'hn_beta':float}
452+
or {'hn_mu_vec':ndarray, 'hn_lambda_mat':ndarray, 'hn_alpha':float, 'hn_beta':float}
453453
They are obtained by ``get_h_params()`` of GenModel,
454454
``get_h0_params`` of LearnModel or ``get_hn_params`` of LearnModel.
455455
"""
@@ -507,7 +507,7 @@ def set_hn_params(self,**kwargs):
507507
**kwargs
508508
a python dictionary {'h_mu_vec':ndarray, 'h_lambda_mat':ndarray, 'h_alpha':float, 'h_beta':float} or
509509
{'h0_mu_vec':ndarray, 'h0_lambda_mat':ndarray, 'h0_alpha':float, 'h0_beta':float}
510-
or {'hn_mu_vec':ndarray, 'hn_lambda_mat':ndarray, 'hn_alpha':float, 'hn_beta':float}
510+
or {'hn_mu_vec':ndarray, 'hn_lambda_mat':ndarray, 'hn_alpha':float, 'hn_beta':float}
511511
They are obtained by ``get_h_params()`` of GenModel,
512512
``get_h0_params`` of LearnModel or ``get_hn_params`` of LearnModel.
513513
"""

doc/bayesml.metatree.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

doc/index.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
sphinx-quickstart on Mon Feb 21 21:21:00 2022.
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
5+
.. Document Author
6+
Yuta Nakahara <yuta.nakahara@aoni.waseda.jp>
7+
Shota Saito <shota.s@gunma-u.ac.jp>
58
69
BayesML's Documentation
710
=======================
@@ -41,7 +44,7 @@ Example
4144

4245
We show an example of generating data drawn according to the Bernoulli distribution and learning from them.
4346

44-
First, we create an instance of a probabilistic data generative model. Here, the parameter $\theta$, which represents an occurrence probability of 1, is set to 0.7.
47+
First, we create an instance of a probabilistic data generative model. Here, the parameter `theta`, which represents an occurrence probability of 1, is set to 0.7.
4548

4649
.. code-block::
4750
@@ -64,7 +67,7 @@ Outputs:
6467
| x4:[1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 0]
6568
.. image:: ./images/README_ex_img1.png
6669

67-
After confirming that the frequency of occurrence of 1 is around $\theta$=0.7, we generate a sample and store it to variable x.
70+
After confirming that the frequency of occurrence of 1 is around `theta=0.7`, we generate a sample and store it to variable `x`.
6871

6972
.. code-block::
7073
@@ -88,7 +91,7 @@ Outputs:
8891

8992
.. image:: ./images/README_ex_img2.png
9093

91-
After learning from the data, we can see that the density of the posterior distribution is concentrated around the true parameter $\theta$=0.7.
94+
After learning from the data, we can see that the density of the posterior distribution is concentrated around the true parameter `theta=0.7`.
9295

9396
.. code-block::
9497

docs/_sources/bayesml.metatree.rst.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/_sources/index.rst.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
sphinx-quickstart on Mon Feb 21 21:21:00 2022.
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
5+
.. Document Author
6+
Yuta Nakahara <yuta.nakahara@aoni.waseda.jp>
7+
Shota Saito <shota.s@gunma-u.ac.jp>
58
69
BayesML's Documentation
710
=======================
@@ -41,7 +44,7 @@ Example
4144

4245
We show an example of generating data drawn according to the Bernoulli distribution and learning from them.
4346

44-
First, we create an instance of a probabilistic data generative model. Here, the parameter $\theta$, which represents an occurrence probability of 1, is set to 0.7.
47+
First, we create an instance of a probabilistic data generative model. Here, the parameter `theta`, which represents an occurrence probability of 1, is set to 0.7.
4548

4649
.. code-block::
4750
@@ -64,7 +67,7 @@ Outputs:
6467
| x4:[1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 0]
6568
.. image:: ./images/README_ex_img1.png
6669

67-
After confirming that the frequency of occurrence of 1 is around $\theta$=0.7, we generate a sample and store it to variable x.
70+
After confirming that the frequency of occurrence of 1 is around `theta=0.7`, we generate a sample and store it to variable `x`.
6871

6972
.. code-block::
7073
@@ -88,7 +91,7 @@ Outputs:
8891

8992
.. image:: ./images/README_ex_img2.png
9093

91-
After learning from the data, we can see that the density of the posterior distribution is concentrated around the true parameter $\theta$=0.7.
94+
After learning from the data, we can see that the density of the posterior distribution is concentrated around the true parameter `theta=0.7`.
9295

9396
.. code-block::
9497

docs/bayesml.autoregressive.html

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -426,15 +426,13 @@ <h1>bayesml.autoregressive package<a class="headerlink" href="#bayesml-autoregre
426426
<dt class="sig sig-object py" id="bayesml.autoregressive.GenModel.set_h_params">
427427
<span class="sig-name descname"><span class="pre">set_h_params</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#bayesml.autoregressive.GenModel.set_h_params" title="Permalink to this definition"></a></dt>
428428
<dd><p>Set the hyperparameters of the prior distribution.</p>
429-
<dl class="field-list">
429+
<dl class="field-list simple">
430430
<dt class="field-odd">Parameters</dt>
431-
<dd class="field-odd"><dl>
431+
<dd class="field-odd"><dl class="simple">
432432
<dt><strong>**kwargs</strong></dt><dd><p>a python dictionary {‘h_mu_vec’:ndarray, ‘h_lambda_mat’:ndarray, ‘h_alpha’:float, ‘h_beta’:float} or
433-
{‘h0_mu_vec’:ndarray, ‘h0_lambda_mat’:ndarray, ‘h0_alpha’:float, ‘h0_beta’:float}</p>
434-
<blockquote>
435-
<div><p>or {‘hn_mu_vec’:ndarray, ‘hn_lambda_mat’:ndarray, ‘hn_alpha’:float, ‘hn_beta’:float}</p>
436-
</div></blockquote>
437-
<p>They are obtained by <code class="docutils literal notranslate"><span class="pre">get_h_params()</span></code> of GenModel,
433+
{‘h0_mu_vec’:ndarray, ‘h0_lambda_mat’:ndarray, ‘h0_alpha’:float, ‘h0_beta’:float}
434+
or {‘hn_mu_vec’:ndarray, ‘hn_lambda_mat’:ndarray, ‘hn_alpha’:float, ‘hn_beta’:float}
435+
They are obtained by <code class="docutils literal notranslate"><span class="pre">get_h_params()</span></code> of GenModel,
438436
<code class="docutils literal notranslate"><span class="pre">get_h0_params</span></code> of LearnModel or <code class="docutils literal notranslate"><span class="pre">get_hn_params</span></code> of LearnModel.</p>
439437
</dd>
440438
</dl>
@@ -690,15 +688,13 @@ <h1>bayesml.autoregressive package<a class="headerlink" href="#bayesml-autoregre
690688
<dd><p>Set initial values of the hyperparameter of the posterior distribution.</p>
691689
<p>Note that the parameters of the predictive distribution are also calculated from
692690
<code class="docutils literal notranslate"><span class="pre">self.h0_mu_vec</span></code>, <code class="docutils literal notranslate"><span class="pre">slef.h0_lambda_mat</span></code>, <code class="docutils literal notranslate"><span class="pre">self.h0_alpha</span></code> and <code class="docutils literal notranslate"><span class="pre">self.h0_beta</span></code>.</p>
693-
<dl class="field-list">
691+
<dl class="field-list simple">
694692
<dt class="field-odd">Parameters</dt>
695-
<dd class="field-odd"><dl>
693+
<dd class="field-odd"><dl class="simple">
696694
<dt><strong>**kwargs</strong></dt><dd><p>a python dictionary {‘h_mu_vec’:ndarray, ‘h_lambda_mat’:ndarray, ‘h_alpha’:float, ‘h_beta’:float} or
697-
{‘h0_mu_vec’:ndarray, ‘h0_lambda_mat’:ndarray, ‘h0_alpha’:float, ‘h0_beta’:float}</p>
698-
<blockquote>
699-
<div><p>or {‘hn_mu_vec’:ndarray, ‘hn_lambda_mat’:ndarray, ‘hn_alpha’:float, ‘hn_beta’:float}</p>
700-
</div></blockquote>
701-
<p>They are obtained by <code class="docutils literal notranslate"><span class="pre">get_h_params()</span></code> of GenModel,
695+
{‘h0_mu_vec’:ndarray, ‘h0_lambda_mat’:ndarray, ‘h0_alpha’:float, ‘h0_beta’:float}
696+
or {‘hn_mu_vec’:ndarray, ‘hn_lambda_mat’:ndarray, ‘hn_alpha’:float, ‘hn_beta’:float}
697+
They are obtained by <code class="docutils literal notranslate"><span class="pre">get_h_params()</span></code> of GenModel,
702698
<code class="docutils literal notranslate"><span class="pre">get_h0_params</span></code> of LearnModel or <code class="docutils literal notranslate"><span class="pre">get_hn_params</span></code> of LearnModel.</p>
703699
</dd>
704700
</dl>
@@ -750,15 +746,13 @@ <h1>bayesml.autoregressive package<a class="headerlink" href="#bayesml-autoregre
750746
<dd><p>Set updated values of the hyperparameter of the posterior distribution.</p>
751747
<p>Note that the parameters of the predictive distribution are also calculated from
752748
<code class="docutils literal notranslate"><span class="pre">self.hn_mu_vec</span></code>, <code class="docutils literal notranslate"><span class="pre">slef.hn_lambda_mat</span></code>, <code class="docutils literal notranslate"><span class="pre">self.hn_alpha</span></code> and <code class="docutils literal notranslate"><span class="pre">self.hn_beta</span></code>.</p>
753-
<dl class="field-list">
749+
<dl class="field-list simple">
754750
<dt class="field-odd">Parameters</dt>
755-
<dd class="field-odd"><dl>
751+
<dd class="field-odd"><dl class="simple">
756752
<dt><strong>**kwargs</strong></dt><dd><p>a python dictionary {‘h_mu_vec’:ndarray, ‘h_lambda_mat’:ndarray, ‘h_alpha’:float, ‘h_beta’:float} or
757-
{‘h0_mu_vec’:ndarray, ‘h0_lambda_mat’:ndarray, ‘h0_alpha’:float, ‘h0_beta’:float}</p>
758-
<blockquote>
759-
<div><p>or {‘hn_mu_vec’:ndarray, ‘hn_lambda_mat’:ndarray, ‘hn_alpha’:float, ‘hn_beta’:float}</p>
760-
</div></blockquote>
761-
<p>They are obtained by <code class="docutils literal notranslate"><span class="pre">get_h_params()</span></code> of GenModel,
753+
{‘h0_mu_vec’:ndarray, ‘h0_lambda_mat’:ndarray, ‘h0_alpha’:float, ‘h0_beta’:float}
754+
or {‘hn_mu_vec’:ndarray, ‘hn_lambda_mat’:ndarray, ‘hn_alpha’:float, ‘hn_beta’:float}
755+
They are obtained by <code class="docutils literal notranslate"><span class="pre">get_h_params()</span></code> of GenModel,
762756
<code class="docutils literal notranslate"><span class="pre">get_h0_params</span></code> of LearnModel or <code class="docutils literal notranslate"><span class="pre">get_hn_params</span></code> of LearnModel.</p>
763757
</dd>
764758
</dl>

0 commit comments

Comments
 (0)