A company is preparing a large dataset for a SageMaker built-in XGBoost model. The dataset has missing values in both numeric and categorical features, and some categorical features have high cardinality. Which THREE data preparation steps should the company take to optimize model performance? (Choose three.)
Splitting first prevents data leakage from imputation statistics.
Why this answer
Splitting the data into training, validation, and test sets before any imputation prevents data leakage. If imputation statistics (e.g., mean, median) were computed on the full dataset, information from the validation and test sets would influence the training data, leading to overly optimistic performance estimates and poor generalization to new data.
Exam trap
AWS often tests the misconception that all data cleaning (including imputation) should be done on the full dataset before splitting, but the correct order is to split first to preserve the independence of the test set and avoid data leakage.