MLA-C01 Question 51
Select 2You are tasked with preparing a dataset for a machine learning model that predicts customer churn. During the exploratory data analysis, you identify the following issues: (1) some rows have missing values in the 'last_transaction_date' column, (2) there are duplicate records in the dataset, and (3) the 'monthly_spending' column contains extreme outliers. Which combination of techniques would best address these issues?
- A
Remove duplicate records to ensure data integrity.
- B
Impute missing values in the 'last_transaction_date' column with the mean date.
- C
Impute missing values in the 'last_transaction_date' column with a placeholder value such as 'unknown'.
- D
Use statistical methods like z-score or IQR to detect and handle outliers in the 'monthly_spending' column.
- E
Remove rows with missing values in the 'last_transaction_date' column.
Show answer and explanation
Correct answers: A, D
Explanation
To prepare the dataset for machine learning, it is critical to address issues such as duplicates, missing data, and outliers. Removing duplicate records ensures the dataset is clean and free from redundancy. Handling outliers in the 'monthly_spending' column using statistical methods like z-score or IQR prevents extreme values from skewing the model. Other options, such as using mean imputation for dates or removing rows with missing values, are either inappropriate or could result in significant data loss, affecting model performance.
- A. Correct.
Correct: Removing duplicate records ensures the dataset does not contain redundant information, which could distort model training and predictions.
- B. Incorrect.
Incorrect: Imputing dates with a mean value is not a valid approach, as dates are not numeric and mean imputation is not meaningful in this context.
- C. Incorrect.
Incorrect: Using a placeholder value like 'unknown' for missing 'last_transaction_date' may introduce noise into the dataset, especially for time-sensitive features.
- D. Correct.
Correct: Statistical methods like z-score or IQR are standard practices to detect and handle outliers, ensuring the 'monthly_spending' column does not adversely impact model performance.
- E. Incorrect.
Incorrect: Removing rows with missing values may lead to significant data loss, especially if there are a large number of missing values in the dataset.