Databricks Machine Learning Associate Question 169
Single answerDuring a machine learning project, you have identified several features with missing values. You decide to impute these missing values with the mean of the respective feature. Why is it important to add an indicator variable for the missing values in this scenario?
- A
To allow the model to differentiate between actual data points and imputed values.
- B
To prevent the imputed values from skewing the feature distribution.
- C
To improve model interpretability by explicitly accounting for missing data.
- D
To ensure that the imputation method does not introduce bias into the dataset.
Show answer and explanation
Correct answer: A
Explanation
Adding an indicator variable for missing values that have been imputed allows the machine learning model to distinguish between real and imputed data points. This can improve the model's ability to handle missing data during training, as the model can learn patterns related to the missingness itself, which could be important for predictions.
- A. Correct.
Correct. Adding an indicator variable helps the model recognize which values were originally missing, providing additional context that can improve predictive performance.
- B. Incorrect.
Incorrect. While imputing with the mean can affect the feature distribution, adding an indicator variable does not directly solve this issue. Instead, it flags missingness for the model.
- C. Incorrect.
Incorrect. While adding indicator variables can improve model interpretability in some cases, its primary purpose is to help the model account for missing data during training.
- D. Incorrect.
Incorrect. Adding an indicator variable does not directly address bias introduced by the imputation method but instead flags the missing values for the model.