A dataset contains features with missing values. During preprocessing you use XGBoost with a missing-value token and enable K-fold cross-validation. What is the most likely failure mode if you impute missing values outside the cross-validation folds?
Answer
Imputation outside folds can leak statistics from validation folds into training, inflating cross-validation performance
Explanation
If imputation parameters (e.g., means/medians) are computed using all data, validation information contaminates training. That leads to overly optimistic CV metrics.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
A multi-class classifier is evaluated with macro-F1 and shows improvement for frequent classes but degradation for rare classes. You want to address this while maintaining overall stability. Which strategy is most appropriate for SageMaker training workflows?
View question →
In a SageMaker feature store scenario, you must ensure training and online inference both see identical feature transformations, including event-time correctness for late-arriving data. Which design most reliably achieves that?
View question →
A pipeline needs to train, evaluate, and conditionally register a model in a multi-account environment. Which combination of AWS services and settings most directly supports automated deployment governance while enforcing least-privilege access to the trained model artifacts?
View question →
A dataset includes user events. You need to build an online feature set that reflects the last known state at request time, even when events arrive out of order. Which SageMaker Feature Store pattern best satisfies point-in-time correctness requirements?
View question →
You have a trained model and must decide between using a SageMaker model package for deployment and using a raw training artifact directly. Which choice best supports reproducibility and auditability in a governed workflow?
View question →
You want to deploy a model with real-time inference, but you expect high variance in request sizes and latency. Which SageMaker deployment configuration most directly helps stabilize inference performance and reduce tail latency?
View question →