mirror of
https://github.com/Doctorado-ML/FImdlp.git
synced 2025-08-18 00:45:52 +00:00
make static methods factorize and test_sklrn_trans
This commit is contained in:
@@ -151,7 +151,8 @@ class FImdlp(TransformerMixin, BaseEstimator):
|
|||||||
)
|
)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def factorize(self, yy):
|
@staticmethod
|
||||||
|
def factorize(yy):
|
||||||
"""Factorize the input labels
|
"""Factorize the input labels
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
|
@@ -205,7 +205,8 @@ class FImdlpTest(unittest.TestCase):
|
|||||||
computed = clf.factorize(y)
|
computed = clf.factorize(y)
|
||||||
self.assertListEqual([0, 1, 1, 2, 3], computed)
|
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):
|
for check, test in check_estimator(FImdlp(), generate_only=True):
|
||||||
test(check)
|
test(check)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user