From 5f0608ce50465d4eddc68bac29106474fa484017 Mon Sep 17 00:00:00 2001 From: AnFreTh Date: Mon, 15 Jul 2024 10:46:56 +0000 Subject: [PATCH] remove unecessary code --- mambular/preprocessing/preprocessor.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mambular/preprocessing/preprocessor.py b/mambular/preprocessing/preprocessor.py index f948877..c485f88 100644 --- a/mambular/preprocessing/preprocessor.py +++ b/mambular/preprocessing/preprocessor.py @@ -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( @@ -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( @@ -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)) )