from sklearn.preprocessing import RobustScaler scaler = RobustScaler(quantile_range=(25.0, 75.0)) X_scaled = scaler.fit_transform(X) What is the primary advantage of this approach over StandardScaler?
Key points
- StandardScaler is sensitive to outliers.
- RobustScaler uses median and IQR.
- RobustScaler maintains outlier influence without letting it dominate the scale.
Ready to go further?
