MLA-C01 Question 83
Select 3You are a Machine Learning Engineer at a company building a model to predict customer churn. Your dataset contains multiple columns, including customer IDs, categorical variables, and numerical features. Upon inspecting the dataset, you notice missing values in some numerical columns, duplicate rows, and inconsistent formatting in a categorical column. What steps should you take to ensure data integrity before proceeding with model training?
- A
Remove duplicate rows from the dataset.
- B
Impute missing values in the numerical columns using an appropriate statistical method.
- C
Ignore the missing values and proceed with the data as is.
- D
Standardize the formatting of the categorical column to ensure consistency.
- E
Drop the categorical column entirely since it has inconsistent formatting.
Show answer and explanation
Correct answers: A, B, D
Explanation
Ensuring data integrity involves removing duplicates to avoid redundancy, imputing missing values to maintain dataset completeness, and standardizing categorical data for consistency. Ignoring issues like missing values or inconsistent formatting can lead to poor model performance, while unnecessarily dropping features may result in a loss of valuable information.
- A. Correct.
Removing duplicate rows ensures that the dataset does not contain redundant information, which could bias the model or skew results.
- B. Correct.
Imputing missing values in numerical columns using an appropriate method (e.g., mean, median, or mode) ensures the dataset is complete and prevents errors during model training.
- C. Incorrect.
Ignoring missing values and proceeding without addressing them can lead to errors during model training and negatively affect performance.
- D. Correct.
Standardizing the formatting of categorical columns ensures consistency, which is essential for correct encoding or transformation during preprocessing.
- E. Incorrect.
Dropping the categorical column is not recommended unless it is irrelevant to the problem. Inconsistent formatting should be fixed rather than removing potentially valuable features.