Databricks Machine Learning Associate Question 517
Select 3You are working on a dataset containing both numerical and categorical features, some of which have missing values. You decide to impute the missing values using the mean, median, or mode. Which of the following statements correctly describe the differences and appropriate use cases for these imputation methods?
- A
Using the mean to impute missing values is appropriate for numerical data that is symmetrically distributed.
- B
The median is a better imputation choice than the mean for numerical features with significant outliers.
- C
The mode is the most suitable imputation method for categorical features with a small number of unique values.
- D
Imputing missing values with the mean is always better than using the median, regardless of the data distribution.
- E
The mode can also be used effectively for numerical features that exhibit a unimodal distribution.
Show answer and explanation
Correct answers: A, B, C
Explanation
The choice of imputation method depends on the data type and distribution. The mean is suitable for symmetrically distributed numerical data, as it accurately represents the central tendency. The median is preferred for numerical data with outliers or skewed distributions because it is robust to extreme values. The mode is ideal for categorical features, especially with a small number of unique values, as it preserves the categorical nature of the feature. Incorrect imputation choices can distort the data distribution and negatively impact model performance.
- A. Correct.
Using the mean is appropriate for numerical data that is symmetrically distributed because the mean represents the central tendency accurately in such cases. For skewed data, the mean can be misleading due to the influence of outliers.
- B. Correct.
The median is less sensitive to outliers compared to the mean, making it a better choice for numerical features with significant outliers or skewed distributions.
- C. Correct.
The mode is the most suitable imputation method for categorical features with a small number of unique values because it represents the most frequent category, maintaining the feature's categorical nature.
- D. Incorrect.
This statement is incorrect. The mean is not always better than the median. The choice depends on the data distribution, the median is preferred for skewed data or data with outliers.
- E. Incorrect.
While the mode can technically be applied to numerical features, its effectiveness is limited unless the numerical data exhibits strong modality, which is rare in most datasets used for machine learning.