Skip to content

IAI Actuarial Core Principles · Risk Modelling and Survival Analysis · Elementary principles of machine learning

When building a predictive model for insurance data, which action best reduces the risk of data leakage?

Fit scaling and feature-selection steps using only the training data, then apply them unchanged to the test data. This keeps the test set independent so that performance estimates are not contaminated by information the model should not have seen.

  1. AStandardising variables using the mean and standard deviation of the whole dataset before splitting into training and test sets
  2. BFitting scaling and feature-selection steps only on the training data and then applying them to the test dataCorrect
  3. CUsing the test set repeatedly to tune hyperparameters until performance is maximised
  4. DIncluding a variable that is recorded only after the claim has been settled
  5. Increasing the number of predictors until training error reaches zero

Explanation

Leakage occurs when information from outside the training data influences the model. Fitting preprocessing only on training data and then applying it to the test data keeps the test set independent. The other options either use test information or use variables unavailable at prediction time.

Did you get it right without looking?

One question tells you little. A timed set on Elementary principles of machine learning shows your real accuracy, how long you take and where you lose marks.

More Elementary principles of machine learning questions