Skip to content

Commit

Permalink
divergence measure unit test - style
Browse files Browse the repository at this point in the history
  • Loading branch information
JustGlowing committed Aug 28, 2024
1 parent 308c2d1 commit b2e71c2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions minisom.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,10 +914,11 @@ def test_divergence_measure(self):
r = 0
for d in test_data:
for i in self.som._neigx:
for j in self.som._neigy:
for j in self.som._neigy:
w = self.som.get_weights()[i, j]
h = self.som.neighborhood(self.som.winner(d), self.som._sigma)[i,j]
r += h * norm(d-w)
h = self.som.neighborhood(self.som.winner(d),
self.som._sigma)[i, j]
r += h * norm(d - w)
assert_array_almost_equal(r, self.som.divergence_measure(test_data))

def test_random_seed(self):
Expand Down

0 comments on commit b2e71c2

Please sign in to comment.