diff --git a/tests/test_check_estimators.py b/tests/test_check_estimators.py index 387ba204c..5d4643ff9 100644 --- a/tests/test_check_estimators.py +++ b/tests/test_check_estimators.py @@ -6,10 +6,7 @@ from skmatter.feature_selection import PCovCUR as fPCovCUR from skmatter.feature_selection import PCovFPS as fPCovFPS from skmatter.linear_model import RidgeRegression2FoldCV # OrthogonalRegression, -from skmatter.preprocessing import ( - KernelNormalizer, - StandardFlexibleScaler, -) +from skmatter.preprocessing import KernelNormalizer, StandardFlexibleScaler @parametrize_with_checks( diff --git a/tests/test_sample_simple_cur.py b/tests/test_sample_simple_cur.py index 6898f3d22..dda1d71aa 100644 --- a/tests/test_sample_simple_cur.py +++ b/tests/test_sample_simple_cur.py @@ -1,7 +1,6 @@ import unittest import numpy as np -from sklearn import exceptions from sklearn.datasets import fetch_california_housing as load from skmatter.sample_selection import CUR, FPS @@ -10,12 +9,12 @@ class TestCUR(unittest.TestCase): def setUp(self): self.X, _ = load(return_X_y=True) - self.X = FPS(n_to_select=100).fit(self.X).transform(self.X) + self.X = self.X[FPS(n_to_select=100).fit(self.X).selected_idx_] self.n_select = min(20, min(self.X.shape) // 2) def test_bad_transform(self): selector = CUR(n_to_select=2) - with self.assertRaises(exceptions.NotFittedError): + with self.assertRaises(ValueError): _ = selector.transform(self.X) def test_restart(self):