From fa8c4a221db926d6e8574acc2e9342de86cd603f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana?= Date: Tue, 11 Apr 2023 19:45:37 +0200 Subject: [PATCH] Remove duplicated lines --- src/fimdlp/mdlp.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/fimdlp/mdlp.py b/src/fimdlp/mdlp.py index f94225a..4e5503a 100644 --- a/src/fimdlp/mdlp.py +++ b/src/fimdlp/mdlp.py @@ -115,8 +115,6 @@ class FImdlp(TransformerMixin, BaseEstimator): ) # target of every feature. Start with -1 => y (see join_fit) self.target_ = [-1] * self.n_features_in_ - # target of every feature. Start with -1 => y (see join_fit) - self.target_ = [-1] * self.n_features_in_ return self def _fit_discretizer(self, feature): @@ -253,13 +251,11 @@ class FImdlp(TransformerMixin, BaseEstimator): ) if target in features: raise ValueError("Target cannot be in features to join") - raise ValueError("Target cannot be in features to join") y_join = [ f"{str(item_y)}{''.join([str(x) for x in items_x])}".encode() for item_y, items_x in zip(self.y_, data[:, features]) ] self.target_[target] = features + [-1] - self.target_[target] = features + [-1] self.y_join_ = y_join self.discretizer_[target].fit(self.X_[:, target], factorize(y_join)) self.cut_points_[target] = self.discretizer_[target].get_cut_points()