Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

SOMの実装 #18

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Binary file modified .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.pythonPath": "/opt/homebrew/bin/python3"
}
Binary file added flab_techniqs/.DS_Store
Binary file not shown.
Binary file added som/.DS_Store
Binary file not shown.
47 changes: 25 additions & 22 deletions som/2018_som.ipynb

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions som/ando_som.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import numpy as np
import matplotlib.pyplot as plt
N=100
L = 2
D = 2

def gen_kura_data(num):
#num = params.num_samples
np.random.seed(0)
z1 = np.random.uniform(low=-1, high=+1, size=(num))
z2 = np.random.uniform(low=-1, high=+1, size=(num))

X = np.empty(shape=(num, 3))
X[:, 0] = z1
X[:, 1] = z2
X[:, 2] = 0.5 * (z1**2 - z2**2)
return X

X = gen_kura_data(N)
#fig = plt.figure()
#ax = fig.add_subplot(111, projection='3d')
#ax.scatter(X[:, 0], X[:, 1], X[:, 2])
#plt.show()

Z = np.random.rand(N,L)
61,886 changes: 61,886 additions & 0 deletions som/ando_som_training.ipynb

Large diffs are not rendered by default.

Binary file added som/change_ver2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added som/tmp.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.