Feature scaling choices matter when there are outliers. One extreme value squashes min-max scaling, while robust scaling (median and IQR) barely notices it.
Implement column-wise with NumPy:
minmax_fit(X) → (mins, ranges), where a range of 0 becomes 1minmax_transform(X, params, clip=False): (X - min) / range, clipped to [0, 1] if cliprobust_fit(X) → (medians, iqrs), using np.percentile 25 and 75, where an IQR of 0 becomes 1robust_transform(X, params): (X - median) / iqr