NCA-ADS - Machine Learning With RAPIDS - Section 2.1

Train models on the GPU with cuML and XGBoost.

Train machine learning models on GPU hardware using cuML's scikit-learn-compatible API and XGBoost's GPU-accelerated gradient boosting. Compare the speedups achieved over CPU-based training and recognise which algorithm families benefit most from GPU execution.

cuMLXGBoost

Practice question for this objective

Free sampleMachine Learning With RAPIDSmedium

An engineer wants to train a gradient-boosted decision tree classifier on a 20-million-row cuDF DataFrame, using GPU acceleration for tree construction. A colleague says the cuML RandomForestClassifier and a gradient-boosted model are interchangeable here. Which statement most accurately distinguishes the correct tool and its relationship to cuML?

  • AGradient boosting is provided by XGBoost, a separate library from cuML, which builds trees sequentially to correct prior errors; cuML RandomForestClassifier builds trees independently in parallel and is not a boosting method. Correct
  • BcuML RandomForestClassifier is itself a gradient-boosting estimator, so it and XGBoost are interchangeable and both build trees sequentially on the GPU.
  • CGradient boosting is exposed through cuML as a native cuml.GradientBoostingClassifier estimator, so no external library is needed and XGBoost is only a CPU fallback.
  • DBoth methods are identical in result, so the only difference is that XGBoost requires NumPy arrays while cuML accepts cuDF DataFrames directly.
Recognise that GPU gradient boosting comes from XGBoost, a separate sequential-boosting library, distinct from cuML's bagging-based RandomForest. Random forests bag many independently grown trees and average them, whereas gradient boosting in XGBoost adds trees sequentially, each fitting the residual errors of the ensemble so far; XGBoost is its own GPU-capable library outside cuML, so the two are different algorithms rather than interchangeable.

Why A is correct: XGBoost is a distinct GPU-capable library, not part of cuML, and it boosts by adding trees that fit the residual errors of earlier trees; cuML RandomForest instead bags many independent trees, so the two are different algorithms and not interchangeable, which is the accurate distinction.

Why B is wrong: This is tempting because both are GPU tree ensembles in the RAPIDS ecosystem, but random forests use bagging with independent trees, not sequential boosting, so calling the cuML estimator a gradient-boosting method misstates how it builds its trees.

Why C is wrong: It sounds plausible that cuML would bundle every common estimator, but cuML does not ship a native gradient-boosting classifier of that name and XGBoost is a separate GPU-accelerated library, not merely a CPU fallback, so this misdescribes both the API and XGBoost's role.

Why D is wrong: The input-format claim contains a grain of truth about cuDF interoperability, but the headline assertion that boosting and bagging give identical results is wrong, and modern XGBoost can consume GPU data structures, so this both conflates the algorithms and misstates the data handling.

See more NCA-ADS practice questions, answers explained.

More in this domain

Back to all Machine Learning With RAPIDS objectives, or the NCA-ADS cert hub.

Examworthy is not affiliated with or endorsed by NVIDIA. Original, blueprint-aligned practice material only.