From 69ea2e9d2b0677de9f2600f55b45a0d88bef0da0 Mon Sep 17 00:00:00 2001 From: JustGlowing Date: Wed, 28 Aug 2024 13:50:09 +0100 Subject: [PATCH] unit test improv --- minisom.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/minisom.py b/minisom.py index f6e657d..620faa0 100644 --- a/minisom.py +++ b/minisom.py @@ -910,9 +910,8 @@ def test_quantization(self): assert q[1] == 2.0 def test_divergence_measure(self): - test_data = array([[4], [2]]) - # test that doesn't use vectorization + test_data = array([[4], [2]]) r = 0 for d in test_data: for i in self.som._neigx: @@ -927,7 +926,6 @@ def test_divergence_measure(self): som = MiniSom(2, 1, 2, random_seed=1) som._weights = array([[[0., 1.]], [[1., 0.]]]) test_data = array([[1., 0.], [0., 1.]]) - h1 = som.neighborhood(som.winner(test_data[0]), som._sigma) h2 = som.neighborhood(som.winner(test_data[1]), som._sigma) r = h1[0][0] * sqrt(2) + h1[1][0] * 0