Skip to content
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

#129_欠損対応(重み付き)TSOM3の追加 #130

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f084fe6
add tsom3_weighted
forusufia Mar 14, 2020
3ebd083
ちょっとコード整理
forusufia Mar 23, 2020
17b12a7
ペアプロ用のコードを作成
takuro-Ishida Mar 25, 2020
14f04d4
main文を追加
takuro-Ishida Apr 2, 2020
a6f9c3d
Gの作成
takuro-Ishida Apr 2, 2020
99c0662
Gの計算を修正
takuro-Ishida Apr 2, 2020
37eba97
一次モデルを作成
takuro-Ishida Apr 2, 2020
6b7bed4
U1の更新ができた
takuro-Ishida Apr 2, 2020
60df697
一次モデルの計算が終了
takuro-Ishida Apr 2, 2020
d785a7a
2次モデルの作成が終了.
takuro-Ishida Apr 2, 2020
799736a
G4とG1*H1のsumのallcloseが一致したことを確認
takuro-Ishida Apr 2, 2020
3088b4a
分子もtrueになったことを確認
takuro-Ishida Apr 2, 2020
29e2b5c
直接型のYと一次モデルを使ったYが一致していることを確認
takuro-Ishida Apr 2, 2020
6f058cc
必要のないコードを削除
takuro-Ishida Apr 2, 2020
d6b2ca3
勝者決定のコードを作成
takuro-Ishida Apr 2, 2020
835aa1e
アルゴリズム部分は実装完了あとはテスト
takuro-Ishida Apr 2, 2020
2aca88f
バグの修正、必要のないコードの削除、勝者決定の部分の修正を行った
takuro-Ishida Apr 2, 2020
f4118cf
実行できる状態にした.allcloseならず
takuro-Ishida Apr 2, 2020
0495a79
Yの更新式を修正したが、allclose ならず・・・
forusufia Apr 7, 2020
69f0229
allclose 通過のためのデバッグ中
Apr 10, 2020
2f701ce
デバッグ中 H3 やk3 から狂いが出てる
Apr 14, 2020
a150577
G が掛かってなかった・・・
Apr 14, 2020
f49e31c
epoch を変えてallclose 確認
Apr 14, 2020
9857cad
不要ログ削除
Apr 14, 2020
16ae80f
パラメータの変更とtestする変数の追加
takuro-Ishida Apr 15, 2020
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
Prev Previous commit
パラメータの変更とtestする変数の追加
  • Loading branch information
takuro-Ishida committed Apr 15, 2020
commit 16ae80f983ae407e9c0544101cf04b235e4288b0
17 changes: 10 additions & 7 deletions tests/tsom/tsom3/allclose_tsom3_ishida_vs_another.py
Original file line number Diff line number Diff line change
@@ -23,10 +23,10 @@ def test_ishida_vs_another(self):
# set learning parameter
nb_epoch = 60
latent_dim = [2, 2,2]
resolution = [5, 5,5]
sigma_max = [2.0, 2.0,2.0]
sigma_min = [0.2, 0.2,0.2]
tau = [50, 50,50]
resolution = [15,10,5]
sigma_max = [1.0, 2.0,1.5]
sigma_min = [0.1, 0.2,0.3]
tau = [15, 25,35]

## prepare init
Z1init = np.random.rand(X.shape[0], latent_dim[0])
@@ -44,14 +44,17 @@ def test_ishida_vs_another(self):
init=init)
# learn
tsom3_ishida.fit(nb_epoch=nb_epoch)


tsom3_another.fit(nb_epoch=nb_epoch)


# test
np.testing.assert_allclose(tsom3_ishida.history['y'], tsom3_another.history['y'])

np.testing.assert_allclose(tsom3_ishida.history['z1'], tsom3_another.history['z1'])
np.testing.assert_allclose(tsom3_ishida.history['z2'], tsom3_another.history['z2'])
np.testing.assert_allclose(tsom3_ishida.history['z3'], tsom3_another.history['z3'])
np.testing.assert_allclose(tsom3_ishida.history['sigma1'], tsom3_another.history['sigma1'])
np.testing.assert_allclose(tsom3_ishida.history['sigma2'], tsom3_another.history['sigma2'])
np.testing.assert_allclose(tsom3_ishida.history['sigma3'], tsom3_another.history['sigma3'])


if __name__ == "__main__":