Script | Fe Transformer
return self
# Add interaction features (example: product of top 2 numeric) if self.poly_degree >= 2 and len(self.numeric_features) >= 2: f1, f2 = self.numeric_features[0], self.numeric_features[1] X_transformed[f'f1_x_f2'] = X_transformed[f1] * X_transformed[f2] FE Transformer Script
# Fit encoder for categoricals if self.encode and self.categorical_features: self.encoder_ = OneHotEncoder(handle_unknown='ignore', sparse_output=False) self.encoder_.fit(X[self.categorical_features]) return self # Add interaction features (example: product

