提交 73ab800f 编辑于 作者: Toshihiro Nakae's avatar Toshihiro Nakae
浏览文件

add link to files and external pages, and some modifications

上级 d6d527c4
加载中
加载中
加载中
加载中
+6 −6
原始行号 差异行号 差异行
@@ -58,7 +58,7 @@ energy = model.predict(x_test)
```

## Jupyter Notebook Example
You can use jupyter notebook example.
You can use [jupyter notebook example](Example_DAGMM.ipynb).
This example uses random samples of mixture of gaussian.
(need sklearn)

@@ -69,12 +69,12 @@ has covariance matrix inversion, but it is impossible sometimes
because of singularity.

Instead, this implementation uses cholesky decomposition of covariance matrix.
(this is based on GMM code in Tensorflow code)
(this is based on [GMM code in Tensorflow code](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/factorization/python/ops/gmm_ops.py))

In DAGMM.fit(), it generates and stores triangular matrix of cholesky decomposition
of covariance matrix, and it is used in DAGMM.predict(),
In ``DAGMM.fit()``, it generates and stores triangular matrix of cholesky decomposition
of covariance matrix, and it is used in ``DAGMM.predict()``,

In addition to it, small perturbation (1e-3) is added to diagonal
elements of covariance matrix for more numerical stability
(it is same as Tensorflow GMM implementation, and another author of
DAGMM also points it out)
(it is same as Tensorflow GMM implementation,
and [another author of DAGMM](https://github.com/danieltan07/dagmm) also points it out)
+5 −4
原始行号 差异行号 差异行
@@ -59,8 +59,8 @@ energy = model.predict(x_test)
```

## Jupyter Notebook サンプル
Jupyter notebook での実行サンプルを用意しました。
このサンプルでは、混合ガウス分布に対して適用した結果となっています。
Jupyter notebook での[実行サンプル](./Example_DAGMM_ja.ipynb)を用意しました。
このサンプルでは、混合正規分布に対して適用した結果となっています。
(sklearn が必要です)

# 補足
@@ -71,12 +71,13 @@ Jupyter notebook での実行サンプルを用意しました。
逆行列の計算ができません。

これを避けるために、この実装では共分散行列のコレスキー分解(Cholesky Decomposition)
を用いています(Tensorflow における GMM の実装でも同様のロジックがあり、参考にしました)
を用いています([Tensorflow における GMM の実装]((https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/factorization/python/ops/gmm_ops.py))でも同様のロジックがあり、参考にしました)

``DAGMM.fit()``において、共分散行列のコレスキー分解をしておき、算出された
三角行列を ``DAGMM.predict()`` で利用しています。

さらに、共分散行列の対角行列にあらかじめ小さな値(1e-3)を加えることで、
安定的にコレスキー分解ができるようにしています。
(Tensorflow の GMM でも同様のロジックがあり、DAGMMの別実装の実装者も
(Tensorflow の GMM でも同様のロジックがあり、
[DAGMMの別実装の実装者](https://github.com/danieltan07/dagmm)
同じ事情について言及しています)