A feature engineering pipeline includes missing values in numerical and categorical columns. Which preprocessing choice is generally appropriate for categorical variables before training a tree-based model like XGBoost?
Answer
Use a strategy that converts categories to numeric representations (e.g., ordinal encoding) and handle missing explicitly
Explanation
Tree models require numeric inputs; encoding categoricals and treating missing values consistently prevents errors and improves learning stability.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
Which approach best describes how to use SageMaker Pipeline to orchestrate preprocessing, training, and model evaluation steps?
View question →
Consider a deep learning model for text classification where you use embeddings. Which technique best helps reduce overfitting?
View question →
When deploying a model on SageMaker, which scenario best fits using a Multi-Model Endpoint?
View question →
In Amazon SageMaker, what is the purpose of a Feature Store feature group when using online inference?
View question →
In SageMaker training jobs with automatic model tuning, what does “objective metric” typically define?
View question →
You have an imbalanced binary classification problem. Which combination of actions is most appropriate to improve model learning and evaluation?
View question →