MLS-C01 Question 93
Single answerYou are working on a machine learning project to predict customer churn for a subscription-based service. The dataset contains user information such as customer ID, sign-up date, subscription plan, monthly usage metrics, and a churn indicator. During the feature engineering phase, how should you process the 'sign-up date' column to make it useful for training the model?
- A
Convert it to a numerical feature representing the number of days since the sign-up date.
- B
Drop the 'sign-up date' column as it is not directly related to churn prediction.
- C
Encode it as a categorical feature where each unique date is assigned a numerical label.
- D
Use it as is, since most machine learning models can handle date formats directly.
Show answer and explanation
Correct answer: A
Explanation
Feature engineering involves transforming raw data into features that better represent the underlying problem to the predictive models. In this case, the 'sign-up date' is better represented as the number of days since the sign-up date, which captures its temporal relationship with churn. This transformation provides the model with a numerical feature that is directly useful for training.
- A. Correct.
Converting the 'sign-up date' to a numerical feature such as the number of days since the sign-up date helps capture the temporal relationship between the sign-up date and churn. This is a practical and meaningful transformation.
- B. Incorrect.
Dropping the 'sign-up date' column ignores potentially valuable information. The time since sign-up can be a strong predictor of churn, so removing this feature may reduce the model's performance.
- C. Incorrect.
Encoding the 'sign-up date' as a categorical feature is not appropriate because dates have a continuous and temporal nature. Treating them as categorical will lead to a loss of meaningful sequential information.
- D. Incorrect.
Using the 'sign-up date' column as is in its raw date format is not ideal since most machine learning algorithms cannot process date formats directly. A transformation is required to make it useful for training.