From 488e8abb52c7cabfcc60d284d471180e911ecf5c Mon Sep 17 00:00:00 2001 From: Denis Arrivault <denis.arrivault@lif.univ-mrs.fr> Date: Fri, 23 Mar 2018 11:44:43 +0100 Subject: [PATCH] Correct tests --- splearn/spectral.py | 1 + splearn/tests/test_spectral.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/splearn/spectral.py b/splearn/spectral.py index ce705d2..d10dea8 100644 --- a/splearn/spectral.py +++ b/splearn/spectral.py @@ -149,6 +149,7 @@ class Spectral(BaseEstimator): "lrows": self.lrows, "lcolumns": self.lcolumns, "partial": self.partial, "sparse": self.sparse, + "full_svd_calculation" : self.full_svd_calculation, "smooth_method" : self.smooth_method, "mode_quiet" : self.mode_quiet } diff --git a/splearn/tests/test_spectral.py b/splearn/tests/test_spectral.py index 314aa17..23402c1 100644 --- a/splearn/tests/test_spectral.py +++ b/splearn/tests/test_spectral.py @@ -49,7 +49,7 @@ class SpectralTest(unittest.TestCase): def test_version(self): adr = get_dataset_path("essai") data = load_data_sample(adr=adr) - cl = Spectral(partial=False, sparse=False, version="prefix") + cl = Spectral(partial=False, sparse=False, full_svd_calculation= "True", version="prefix") X = data.data cl.fit(X=X) np.testing.assert_almost_equal(cl.automaton.initial, @@ -57,7 +57,7 @@ class SpectralTest(unittest.TestCase): 1.30974719e-02, -1.66533454e-16, -3.70074342e-17])) - cl = Spectral(partial=False, sparse=False, version="suffix") + cl = Spectral(partial=False, sparse=False, full_svd_calculation= "True", version="suffix") cl.fit(X=X) np.testing.assert_almost_equal(cl.automaton.initial, np.array( @@ -65,7 +65,7 @@ class SpectralTest(unittest.TestCase): 2.89623130e-01, 1.85499764e-15, 0.00000000e+00])) cl = Spectral(partial=False, sparse=False, - version="factor", mode_quiet=False) + version="factor", full_svd_calculation= True, mode_quiet=False) cl.fit(X=X) np.testing.assert_almost_equal(cl.automaton.final, np.array([ -4.35303631e-01, -- GitLab