MLS-C01 Question 75
Select 2You are building a machine learning model to predict customer churn using Amazon SageMaker. During the data preprocessing phase, you observe that some columns in your dataset contain missing values, while others contain frequent occurrences of irrelevant words like 'the', 'and', and 'is'. What steps should you take to handle these issues effectively before training the model?
- A
Impute missing values using statistical methods such as mean or median.
- B
Remove rows with missing values completely to ensure data quality.
- C
Use a stop word removal process to filter out irrelevant words from text data.
- D
Replace missing values with zeros to avoid introducing bias.
- E
Leave missing values as they are, as machine learning algorithms can handle them directly.
Show answer and explanation
Correct answers: A, C
Explanation
Handling missing data and stop words is critical for ensuring the quality and performance of machine learning models. Imputing missing values with statistical methods like mean or median helps maintain the integrity of the dataset without significant data loss. Similarly, removing stop words reduces noise in text data, improving model accuracy. While other options may seem viable, they are either less effective or could introduce bias into the model.
- A. Correct.
Imputing missing values using statistical methods like mean or median is a standard practice to avoid data loss while ensuring the dataset remains consistent.
- B. Incorrect.
Removing rows with missing values could lead to significant data loss, especially in large datasets, and is generally not recommended unless the missing data is minimal.
- C. Correct.
Removing stop words from text data is a common preprocessing step to reduce noise and improve the performance of text-based models.
- D. Incorrect.
Replacing missing values with zeros can introduce bias, as zeros might not represent the missing data's true nature. This approach is generally not recommended unless zeros have specific meaning in the context of the dataset.
- E. Incorrect.
Leaving missing values unprocessed can cause issues during model training, as many machine learning algorithms cannot handle missing data directly.