Before training a distance-sensitive classifier, you notice age spans roughly 0–100 while annual_income spans tens of thousands to millions. Which preprocessing action best addresses this scale mismatch?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Pay close attention—this one bites people constantly. If age is 0–100 and income is in the hundreds of thousands, distance-based models and many regularized linear models act like income is the only feature that matters. Fix it with standardization (zero mean, unit variance) or normalization (e.g., min–max). Think of comparing heights in inches to salaries in dollars without converting units—total mess. One-hot is for categories. Feature selection throws variables out; it doesn't reunit the ones you keep. PCA? Scale first or the principal components chase the biggest-variance column. Exam trap: treating any preprocessing buzzword as interchangeable. Different scales → scale the features. Nice and clean.
Full explanation below image
Full Explanation
Many learning algorithms assume or work best when input features live on comparable numeric scales. Distance-based methods such as k-nearest neighbors and k-means compute geometric distances; a feature with a multi-million range can dwarf one measured in tens. Gradient-based linear models and SVMs with regularization can also become dominated by large-magnitude coordinates, slowing optimization or skewing coefficients. Standardization (subtract mean, divide by standard deviation) and normalization (rescale to a fixed range such as [0, 1]) are the standard remedies. Which variant you pick depends on distribution shape and outlier sensitivity, but both directly address the age-versus-income mismatch described.
One-hot encoding is inappropriate as the primary fix: it expands categorical levels into binary indicators and is not a scaling technique for continuous variables. Feature selection may remove irrelevant or redundant columns, yet remaining features can still disagree in units and ranges. Principal component analysis projects data onto directions of high variance; without prior scaling, PCA components often align with the largest raw-scale features, so PCA complements scaling rather than replacing it and serves a different goal (dimensionality reduction / decorrelation).
Best practices: fit scalers on training data only and apply the same parameters to validation and test sets (ideally inside a pipeline); consider robust scalers when outliers are severe; and remember tree-based ensembles are often less sensitive to monotonic scaling, though scaled inputs still help linear baselines and neural nets. Memory aid: mismatched units → scale; categories → encode; too many features → select or reduce; always match the transform to the problem.