Skip to content

Commit

Permalink
remove unecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
AnFreTh committed Jul 15, 2024
1 parent fcb17c1 commit 5f0608c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions mambular/preprocessing/preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ def fit(self, X, y=None):
numeric_transformer_steps.append(("scaler", StandardScaler()))

elif self.numerical_preprocessing == "normalization":
numeric_transformer_steps.append(("normalizer", MinMaxScaler()))
numeric_transformer_steps.append(
("normalizer", MinMaxScaler(feature_range=(-1, 1)))
)

elif self.numerical_preprocessing == "quantile":
numeric_transformer_steps.append(
Expand All @@ -240,12 +242,15 @@ def fit(self, X, y=None):
)

elif self.numerical_preprocessing == "polynomial":
numeric_transformer_steps.append(("scaler", StandardScaler()))
numeric_transformer_steps.append(
(
"polynomial",
PolynomialFeatures(self.degree, include_bias=False),
)
)
# if self.degree > 10:
# numeric_transformer_steps.append(("normalizer", MinMaxScaler()))

elif self.numerical_preprocessing == "splines":
numeric_transformer_steps.append(
Expand All @@ -260,13 +265,9 @@ def fit(self, X, y=None):
)

elif self.numerical_preprocessing == "ple":
numeric_transformer_steps.append(("normalizer", MinMaxScaler()))
numeric_transformer_steps.append(
("ple", PLE(n_bins=self.n_bins, task=self.task))
("normalizer", MinMaxScaler(feature_range=(-1, 1)))
)

elif self.numerical_preprocessing == "ple":
numeric_transformer_steps.append(("normalizer", MinMaxScaler()))
numeric_transformer_steps.append(
("ple", PLE(n_bins=self.n_bins, task=self.task))
)
Expand Down

0 comments on commit 5f0608c

Please sign in to comment.