Compute both the z-score standardised values (using population standard deviation) and the min-max scaled values on for the feature vector . What drawback of min-max scaling does this example reveal, and which ML algorithms do or do not require feature scaling?
Foundations, Feature engineering
Level L2 Elementary. Length Medium. Nature Th+Mat Both.
What's being asked
Whether you can compute both scalings by hand, diagnose outlier sensitivity, and distinguish scale-sensitive from scale-invariant models.
Key idea
Min-max scaling divides by , so a single outlier crushes normal points into a narrow sub-interval; z-score standardisation centres to mean and unit variance, though severe outliers still distort both and .
Steps
- Compute z-scores : the mean is , and the squared deviations are , so . Thus
- Compute min-max values with and :
- Diagnose the drawback: the three regular values are squeezed into while the single outlier claims nearly two-thirds of the range, and any future test point above will map outside . When outliers are severe, robust scaling (subtracting the median and dividing by the interquartile range) avoids this.
- Classify algorithms: distance-based, margin-based, variance-based and gradient-trained models (-NN, RBF and linear SVMs, PCA, -means, regularised linear/logistic regression, neural networks) depend on feature scale and usually need scaling; axis-aligned tree models (decision trees, random forests, gradient-boosted trees) are invariant to strictly monotone feature transformations and do not.
Common mistakes
- Using the wrong denominator in min-max scaling or forgetting that test points outside will produce values outside .
- Claiming standard linear regression *predictions* change when features are rescaled: unregularised OLS predictions are invariant to invertible linear feature rescaling, though gradient descent converges much faster and L1/L2 regularisation treats features equally only after scaling.
How long your answer should be
Half a page; 3–4 minutes.
Last checked on 4 December 2026.
Read this
Previous in Foundations: You fit two nested Gaussian regression models on data points: Model A has parameters and maximised log-likelihood , while Model B has parameters and . Using and (lower is better), which model does each criterion select?
Next in Foundations: For a -dimensional input vector , a full polynomial expansion of degree at most (including the constant bias term ) has features. What is when and , and what happens to unregularised least-squares linear regression if you only have training examples?