Skip to content

Instantly share code, notes, and snippets.

@tanutarou
tanutarou / model_eval.ipynb
Last active March 3, 2020 14:28
ベイズ統計の理論と方法 6.2.3 例25 再現コード
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tanutarou
tanutarou / tfp_polyfit.ipynb
Created September 27, 2018 18:58
[WIP] bayesian polynomial fitting example by using tensorflow probability
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tanutarou
tanutarou / poisson.ipynb
Last active August 31, 2022 21:03
ポアソン分布に対するベイズ推論(メール受信数を例に実験)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tanutarou
tanutarou / categorical.ipynb
Last active December 8, 2017 22:31
カテゴリカル分布に対するベイズ推定(サイコロの出る目の確率推定)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tanutarou
tanutarou / bernoulli.ipynb
Last active November 25, 2017 06:49
ベルヌーイ試行のMAP推定、ベイズ推定の例:きのこ傘投げ問題
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tanutarou
tanutarou / bayesian_polyfit.ipynb
Created October 15, 2017 11:50
最小二乗法、ガウスノイズモデル、ベイズ線形回帰モデルによる多項式あてはめ
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tanutarou
tanutarou / file0.txt
Created September 23, 2017 11:09
EMアルゴリズムのメモ 「ベイズ推定とグラフィカルモデル:コンピュータビジョン基礎1 セクション7」 ref: http://qiita.com/tanutarou/items/de149f39a52a4c207e3f
\begin{eqnarray}
\sum_i \sum_{k=1}^K q_i(z_k)\ln \left[\frac{p(x_i, z_k|\theta)}{q_i(z_k)} \right] &=& \sum_i \sum_{k=1}^K q_i(z_k)\ln \left[ \frac{p(z_k|x_i,\theta)p(x_i|\theta)}{q_i(z_k)} \right] \\
&=&\sum_i \sum_{k=1}^K q_i(z_k)\ln \left[ p(x_i|\theta) \right] + \sum_i \sum_{k=1}^K q_i(z_k) \ln\left[ \frac{p(z_k|x_i, \theta)}{q_i(z_k)} \right] \\
&=& \sum_i \ln \left[ p(x_i|\theta) \right] +\sum_i \sum_{k=1}^K q_i(z_k) \ln \left[ \frac{p(z_k|x_i, \theta)}{q_i(z_k)} \right]
\end{eqnarray}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tanutarou
tanutarou / mcmc.ipynb
Last active September 5, 2017 12:22
『計算統計Ⅱ マルコフ連鎖モンテカルロ法とその周辺』 第1部2章の再現コード (p.8~28)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tanutarou
tanutarou / monte_carlo_pi.ipynb
Created September 3, 2017 06:32
Calculation of Pi Using the Monte Carlo Method
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.