MLA-C01 Question 58
Single answerYou are building a machine learning model to predict customer churn using a dataset with both numerical and categorical features. One of the numerical features, 'MonthlyCharges', has a highly skewed distribution with extreme outliers. Which feature engineering technique is most appropriate to handle this issue before training the model?
- A
Apply one-hot encoding to the 'MonthlyCharges' feature.
- B
Perform log transformation on the 'MonthlyCharges' feature.
- C
Scale the 'MonthlyCharges' feature using min-max normalization.
- D
Split the 'MonthlyCharges' feature into bins using equal-width binning.
Show answer and explanation
Correct answer: B
Explanation
The 'MonthlyCharges' feature has a highly skewed distribution with extreme outliers, which can negatively impact the performance of many machine learning algorithms. Log transformation is a common feature engineering technique to reduce skewness and make the data more normally distributed, which improves model performance. Other techniques such as one-hot encoding, normalization, or binning are not suitable for addressing skewness in numerical data.
- A. Incorrect.
One-hot encoding is used for categorical variables, not numerical features like 'MonthlyCharges'.
- B. Correct.
Log transformation is effective for reducing skewness in numerical data and can help handle outliers, making it the most appropriate choice in this scenario.
- C. Incorrect.
Min-max normalization scales the data within a specific range but does not address skewness or outliers.
- D. Incorrect.
Binning can help group values into ranges but does not address the skewness of the feature distribution.