Courseiva
easyMultiple Choice

MLA-C01 Practice Question: A machine learning engineer is training a model…

A machine learning engineer is training a model using SageMaker's built-in XGBoost algorithm. The training job fails with an error indicating insufficient memory. Which parameter should be adjusted to reduce memory usage?

⚠ Common exam trap

AWS exams often test the misconception that subsample or colsample_bytree are the primary knobs for memory reduction, when in fact max_depth has the most direct impact on per-tree memory consumption due to exponential node growth.

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

✓

max_depth

(max_depth) is correct because reducing the maximum depth of trees directly limits the number of splits and nodes per tree, which decreases the memory required to store the tree structure during training. In XGBoost, deeper trees exponentially increase the number of leaf nodes and intermediate splits, consuming more RAM for gradient statistics and tree data. Adjusting max_depth is the most direct way to reduce per-tree memory footprint without altering the dataset size or number of trees.

Answer analysis

Option-by-option breakdown

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

  • ✗

    subsample

    Why it's wrong here

    subsample sets the row fraction drawn per boosting tree, which reduces overfitting and variance rather than the memory consumed by histogram construction. It is tempting because sampling sounds like it shrinks data volume, and it would be the correct choice when seeking regularisation or faster convergence on noisy training data.

  • ✗

    num_round

    Why it's wrong here

    num_round controls the number of boosting iterations, so raising or lowering it changes training time and overfitting, not the per-iteration memory footprint. It is tempting because it is the most familiar XGBoost tuning knob, and it would be the right lever when the model underfits or overfits rather than when the job exhausts memory.

  • ✓

    max_depth

    Why this is correct

    max_depth controls tree depth; deeper trees hold more split statistics and gradients in memory. Reducing it shrinks each tree's memory footprint, letting the SageMaker XGBoost training job fit within the instance's available memory and complete.

  • ✗

    colsample_bytree

    Why it's wrong here

    colsample_bytree controls the fraction of features sampled per tree, affecting regularisation and overfitting rather than memory footprint. Insufficient-memory errors in SageMaker XGBoost are addressed through max_depth, which bounds tree growth. colsample_bytree would be tuned when seeking faster training or reduced variance.

About these practice questions

This MLA-C01 question is part of Courseiva's 665-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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 MLA-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 MLA-C01 exam.