MLS-C01 Question 79
Select 3You are building a machine learning model to predict customer churn for a subscription service. Your dataset contains customer demographics, subscription history, and engagement metrics over time. Some numeric features, such as 'monthly spending' and 'tenure in months,' have vastly different scales, while categorical features like 'subscription type' and 'customer region' contain missing values. What steps should you take to properly preprocess the dataset before training the model?
- A
Normalize the numeric features to ensure they are on the same scale.
- B
One-hot encode the categorical features to convert them into numeric format.
- C
Remove all rows with missing values to ensure data consistency.
- D
Use data augmentation techniques to synthetically create more samples for the training dataset.
- E
Impute missing values in categorical features with a suitable strategy, such as the mode.
Show answer and explanation
Correct answers: A, B, E
Explanation
Preprocessing is a critical step in preparing data for machine learning. For this scenario, numeric features should be normalized to account for differences in scale, while categorical features need to be one-hot encoded to make them numerically interpretable by the model. Missing values in categorical features should be handled with an imputation strategy to avoid data loss. However, removing rows with missing values or using data augmentation techniques for tabular data is not appropriate in this context.
- A. Correct.
Correct: Normalizing numeric features ensures that features with different scales do not disproportionately impact the model's performance.
- B. Correct.
Correct: One-hot encoding is a standard method for converting categorical data into a format that machine learning algorithms can process.
- C. Incorrect.
Incorrect: Removing all rows with missing values can lead to significant data loss, especially in large datasets, and is not a recommended preprocessing step unless a large proportion of the data is missing.
- D. Incorrect.
Incorrect: Data augmentation is typically used for image, text, or time-series data and is not directly applicable to tabular data in this scenario.
- E. Correct.
Correct: Imputing missing values in categorical features helps retain the dataset and prevents errors during model training.