SIENTIAPDE-1241: Fix: Correctly handle feature normalization and denormalization, and add scaler parameters to metadata
This commit is contained in:
@@ -535,8 +535,9 @@ class DataPreprocessor(BaseEstimator, TransformerMixin):
|
||||
|
||||
# Normalization
|
||||
if step == NORMALIZATION and self.scaler:
|
||||
data_treat = data_treat[self.feature_names_order]
|
||||
data_treat[existing_columns] = self.scaler.transform(data_treat[existing_columns])
|
||||
# Only transform feature columns, preserve target and any other required columns
|
||||
feature_cols = self.feature_names_order
|
||||
data_treat[feature_cols] = self.scaler.transform(data_treat[feature_cols])
|
||||
|
||||
# Feature Creation
|
||||
if step == 'Feature Creation':
|
||||
|
||||
Reference in New Issue
Block a user