From 947d54202dc37c9e66480f17674a635139adae37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana?= Date: Tue, 11 Apr 2023 19:35:39 +0200 Subject: [PATCH] Update hyperparams info --- src/fimdlp/mdlp.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/fimdlp/mdlp.py b/src/fimdlp/mdlp.py index 36ce3a0..f94225a 100644 --- a/src/fimdlp/mdlp.py +++ b/src/fimdlp/mdlp.py @@ -27,7 +27,7 @@ class FImdlp(TransformerMixin, BaseEstimator): max_depth: int, default=1e6 The maximum depth of the discretization process. max_cuts: float, default=0 - The maximum number of cut points to be computed for each feature. + The maximum number of cut points to be computed for each feature. Attributes ---------- @@ -115,6 +115,8 @@ 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): @@ -251,11 +253,13 @@ 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()