Feature Engineering, Imputation & Transformations
Preprocess raw tabular data with robust scaling, Box-Cox normality transformations, and MICE missing data imputation.
1. Feature Scaling: StandardScaler vs MinMaxScaler
Distance-based algorithms (SVM, KNN, PCA, Gradient Descent) require feature normalization to prevent large-magnitude columns from dominating the gradient update:
\[ z = \frac{x - \mu}{\sigma} \quad \text{(StandardScaler)}, \qquad x_{\text{scaled}} = \frac{x - x_{\min}}{x_{\max} - x_{\min}} \quad \text{(MinMaxScaler)} \]
2. Box-Cox Power Transformations
Stabilizes non-constant variance and maps skewed distributions into approximate Gaussian normality:
\[ y^{(\lambda)} = \begin{cases} \frac{y^\lambda - 1}{\lambda} & \text{if } \lambda \ne 0 \\ \ln(y) & \text{if } \lambda = 0 \end{cases} \]
🎯 Module Mastery Certification Quiz
+100 XPWhen should you use StandardScaler over MinMaxScaler?