Skip to content

FRM Part I · FRM Exam Part I · Machine-Learning Methods

A risk analyst is building a model to predict loan defaults using features such as annual income (in thousands of dollars, ranging from 20 to 500) and debt-to-income ratio (ranging from 0.05 to 0.80). The analyst plans to use a k-nearest neighbors classifier based on Euclidean distance. Which preprocessing step is MOST appropriate before fitting the model?

Standardize or rescale both features. Euclidean distance depends on the units of each variable, so income, with a far larger range, would dominate the neighbor calculation. Scaling lets income and the debt-to-income ratio contribute comparably, which is essential for distance-based methods such as k-nearest neighbors.

  1. AStandardize or rescale both features so they contribute comparably to the distance calculationCorrect
  2. BLeave the features unchanged because Euclidean distance is invariant to the units of measurement
  3. CDrop the debt-to-income ratio because it has a smaller numerical range
  4. DApply the scaling only to the target variable

Explanation

Euclidean distance is sensitive to feature scale, so the income variable, with its much larger numerical range, would dominate the distance. Standardizing or rescaling puts both features on a comparable footing. Leaving them unchanged is wrong because distance is not unit-invariant.

Did you get it right without looking?

One question tells you little. A timed set on Machine-Learning Methods shows your real accuracy, how long you take and where you lose marks.

More Machine-Learning Methods questions