make static methods factorize and test_sklrn_trans

This commit is contained in:
2023-02-20 20:12:36 +01:00
parent e0b7cae9a0
commit 718c9d0e63
2 changed files with 4 additions and 2 deletions

View File

@@ -151,7 +151,8 @@ class FImdlp(TransformerMixin, BaseEstimator):
)
return result
def factorize(self, yy):
@staticmethod
def factorize(yy):
"""Factorize the input labels
Parameters

View File

@@ -205,7 +205,8 @@ class FImdlpTest(unittest.TestCase):
computed = clf.factorize(y)
self.assertListEqual([0, 1, 1, 2, 3], computed)
def test_sklearn_transformer(self):
@staticmethod
def test_sklearn_transformer():
for check, test in check_estimator(FImdlp(), generate_only=True):
test(check)