Courseiva
ModelingeasyMultiple ChoiceObjective-mapped

MLS-C01 XGBoost missing value handling Practice Question

A data scientist is using Amazon SageMaker to train a model with the built-in XGBoost algorithm. The dataset contains missing values. What is the default behavior of SageMaker XGBoost regarding missing values?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

It automatically learns the best direction (left or right) for missing values during training

SageMaker's built-in XGBoost algorithm treats missing values (i.e., NaN, None, or 0 by default) as a separate category. During training, it automatically learns the best direction (left or right) to assign missing values at each split, based on the reduction in loss. This is the default behavior (Option D). Option A is incorrect because XGBoost does not raise an error; it handles missing values internally. Option B is incorrect because XGBoost does not impute with the column mean; that would require data preprocessing. Option C is incorrect because rows with missing values are not removed; they are included in training with the learned direction.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • It raises an error and stops training

    Why it's wrong here

    Incorrect. XGBoost does not raise an error; it handles missing values internally by learning the best direction.

  • It imputes missing values with the column mean

    Why it's wrong here

    Incorrect. XGBoost does not impute missing values with the column mean; missingness is treated as a separate category during training.

  • It removes rows with missing values

    Why it's wrong here

    Incorrect. Rows with missing values are not removed; they are used with the learned direction for splits.

  • It automatically learns the best direction (left or right) for missing values during training

    Why this is correct

    Correct. By default, XGBoost learns the best direction (left or right) for missing values at each split, minimizing the loss function.

About these practice questions

One of 1,672 original MLS-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This MLS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLS-C01 exam.