NCA-ADS domain - 16% of the exam

Machine Learning With RAPIDS

Machine Learning With RAPIDS is 16% of the NCA-ADS exam. These are the objectives it covers, each with practice questions, with every answer explained.

The domain in numbers

55
Practice questions
6
Objectives
55
Medium

Where people go wrong

  • Fixing a skewed class ratio with the wrong fold change

    The wrong answers reach for more folds, a larger single holdout, or simple random shuffling when a rare positive class leaves some folds with almost no positive cases. More folds make each fold smaller, so near-empty positive folds become more likely. A single holdout discards the variance estimate. Shuffling only balances folds in expectation. Stratified k-fold partitions within each class, so every fold keeps the original positive proportion and the per-fold metrics become comparable.

    See it in a sample question
  • Choosing hyperparameters on the data used to report performance

    The wrong answers treat the optimism of a tuned score as noise. Choosing the best of many configurations on a test set, a validation set or the same cross-validation folds fits the winner partly to that sample's noise, so its score is biased upward. A bigger test set or repeated cross-validation reduces variance but leaves the selection bias in place, and a small validation set adds variance in both directions rather than upward bias. An honest figure needs data untouched by selection: a separate test set evaluated once, or nested cross-validation.

    See it in a sample question
  • Fitting a scaler before the split

    The wrong answers blame memory limits, random seeds, or a need to keep test data unscaled when a scaler is fitted on combined data, or on the whole dataset before cross-validation. The fault is leakage: the scaler's mean and standard deviation absorb information from rows meant to be held out, so the evaluation is optimistic. The scaler is fitted on the training portion only, inside each fold, and then applied to the held-out rows.

    See it in a sample question
  • Dividing by the wrong denominator in classification metrics

    Each wrong option is a valid ratio from the same confusion matrix, attached to the wrong question. Recall divides true positives by actual positives, which include false negatives. Precision divides by predicted positives, which include false positives. Specificity is true negatives over actual negatives, and negative predictive value divides by predicted negatives. Overall accuracy mixes both classes, so a large true-negative count inflates it. The stated cost in the scenario selects the metric.

    See it in a sample question
  • Treating cuML RandomForest and XGBoost as one thing

    The wrong answers treat cuML's RandomForestClassifier and XGBoost as the same algorithm, or XGBoost as a cuML module. A random forest bags trees that are grown independently in parallel. Boosting adds trees in sequence, each fitted to reduce the errors of the ensemble built so far. XGBoost is a separate library with its own GPU histogram tree builder, and it reads cuDF data directly without a cuML estimator.

    See it in a sample question

Objectives in this domain

What to study

The official documents this domain's practice questions cite most.

Sample questions from this domain

Free sampleMachine Learning With RAPIDSmedium

A team trains a GPU-accelerated XGBoost classifier on an imbalanced churn dataset and wants a dependable estimate of how it will generalise. They have a single GPU with enough memory to fit the data several times over, and a colleague proposes plain random 5-fold cross-validation. Given the imbalance, which adjustment to the resampling scheme most directly improves the reliability of the per-fold metrics?

  • AReplace the cross-validation with one larger 90/10 holdout split, since a single bigger test set is more representative than averaging several small folds.
  • BRaise the number of folds from 5 to 20 so each training fold sees more data, which on its own balances the class ratio across folds.
  • CUse stratified k-fold cross-validation so each fold preserves roughly the same minority-class proportion as the full dataset. Correct
  • DShuffle the rows before splitting into the 5 folds, because randomising the order alone balances the class ratio within every fold.
Stratified k-fold cross-validation preserves the minority-class proportion in every fold, giving reliable generalisation estimates on imbalanced data. Plain k-fold assigns rows to folds without regard to the label, so on imbalanced data some folds can hold very few or no minority cases, making their metrics noisy or undefined. Stratified k-fold constrains each fold to mirror the overall class distribution, so every fold is a fair miniature of the data and the averaged score is a dependable generalisation estimate.

Why A is wrong: Tempting because a larger test set feels more stable, but a single split discards the variance reduction of averaging across folds and may leave the rare class barely represented, so it does not address the imbalance.

Why B is wrong: Tempting because larger k does enlarge each training portion, but it shrinks each test fold and can leave individual folds with no minority cases, so increasing k alone does not guarantee balanced representation.

Why C is correct: Correct: stratification holds the rare-class ratio constant across folds, preventing folds with too few or zero positive cases, which stabilises the per-fold metrics and yields a trustworthy averaged estimate under imbalance.

Why D is wrong: Tempting because shuffling removes ordering artefacts, but random shuffling only balances folds in expectation and can still produce folds where the rare class is severely under-represented, which stratification explicitly prevents.

Free sampleMachine Learning With RAPIDSmedium

During hyperparameter tuning of a GPU-accelerated XGBoost model, an engineer scores every candidate configuration on the same held-out test set and keeps the configuration with the highest test score. They then report that test score as the model's expected performance on future data. What is the central flaw in this evaluation procedure?

  • AGradient-boosted models cannot be tuned against a single test set at all, because boosting requires a dedicated validation set for early stopping, so the procedure cannot run.
  • BThe test set is too small to distinguish the candidate configurations, so the procedure would be valid once the test set is made large enough.
  • CHeld-out accuracy is never a valid tuning signal, so the engineer should have selected the configuration on training accuracy instead.
  • DRepeatedly selecting on the test set leaks information from it into model selection, so the reported score is optimistically biased and overstates true generalisation. Correct
Selecting hyperparameters on the test set and reporting that same score leaks selection information and biases the estimate upward. When the test set drives both configuration selection and the final reported figure, the chosen configuration is partly fitted to that set's particular noise, so its score no longer measures generalisation independently. The remedy is to tune on a validation split or via nested cross-validation and reserve an untouched test set for the single reported estimate.

Why A is wrong: Tempting because boosting does benefit from a validation set for early stopping, but the procedure can run and produce numbers; the genuine defect is the biased selection, not an inability to execute it.

Why B is wrong: Tempting because a bigger test set does reduce variance, but enlarging it does not remove the bias from reusing the same set to both choose and report, so size is not the central flaw.

Why C is wrong: Tempting because held-out evaluation is being misused here, but tuning on training accuracy is worse, since it rewards overfitting outright; this swaps one error for a larger one rather than fixing the leakage.

Why D is correct: Correct: every comparison uses the test set to choose a configuration, so the winning score is partly fitted to that set's noise and is inflated; an honest estimate needs a separate validation split for selection and an untouched test set for the final number.

Free sampleMachine Learning With RAPIDSmedium

A data scientist builds a sequence of standard scaling followed by a cuML logistic regression, and evaluates it with five-fold cross-validation. To save effort she fits the scaler once on the whole dataset, then runs cross-validation on the already-scaled features. Why does this ordering bias the cross-validation estimate, and what is the correct ordering?

  • AScaling the whole dataset first changes the logistic regression coefficients, so they no longer match the unscaled production data; the model must instead be trained on raw features and scaled only at inference time.
  • BScaling the whole dataset first makes the features non-normal, which violates the logistic regression assumption of normally distributed inputs; the features must be normalised per fold to satisfy that assumption.
  • CScaling the whole dataset first is slower because it processes all rows at once on the GPU; the scaler should be fitted on a random sample to reduce the per-fold computation time.
  • DScaling the whole dataset first lets the scaler's mean and standard deviation absorb information from every validation fold, so each fold is evaluated with statistics it helped compute; the scaler must be refitted on the training portion inside each fold. Correct
Fit every preprocessing step inside the cross-validation loop on the training fold only, so validation folds never contribute to the learned transformation parameters. Any transformation that learns parameters from data, such as a scaler learning a mean and standard deviation, must see only the training fold; otherwise statistics derived from the validation rows leak into the transformation and the held-out rows are no longer independent. Wrapping the scaler and the estimator together and refitting on each training fold keeps the evaluation honest.

Why A is wrong: It is true that scaling affects coefficients, which makes this sound plausible, but scaling is a legitimate and expected preprocessing step and training on raw features would not fix any cross-validation bias, so this misidentifies both the problem and the remedy.

Why B is wrong: Logistic regression does not assume normally distributed inputs, so the stated assumption is false even though standardisation is being discussed; the real defect is leakage of validation statistics, not a distributional assumption, making this a confident but incorrect diagnosis.

Why C is wrong: Performance is not the issue and fitting on a random sample would itself introduce sampling bias and still leak across folds, so this answer mistakes a correctness problem for a speed problem and proposes a fix that does not address leakage.

Why D is correct: Fitting the scaler on all rows means the centring and scaling constants are computed partly from the validation rows, so those rows are no longer truly held out and the score is optimistic; refitting the scaler on each fold's training portion keeps every validation fold unseen and restores an unbiased estimate.

Free sampleMachine Learning With RAPIDSmedium

A data scientist evaluates a cuML binary classifier that screens loan applications for default, with the confusion matrix below where rows are the true class and columns are the predicted class. The risk team wants to know what fraction of genuinely non-defaulting applicants the model correctly cleared, so it does not needlessly reject good customers. Which value answers that question?

                 Pred: no-default   Pred: default
True: no-default       760              40
True: default           60             140
  • A0.93, the 760 correctly cleared non-defaulters divided by the 820 applicants the model predicted would not default.
  • B0.70, the 140 correctly caught defaulters divided by the 200 applicants who genuinely defaulted.
  • C0.90, the 900 rows the model classified correctly divided by the full 1000 applications in the evaluation set.
  • D0.95, the 760 correctly cleared non-defaulters divided by the 800 applicants who genuinely did not default. Correct
Specificity is true negatives over all actual negatives, read across the true-negative row of the confusion matrix, distinct from accuracy or predictive value. The fraction of genuine non-defaulters correctly cleared is the negative-class recall, also called specificity, defined as true negatives divided by all actual negatives. With 760 true negatives and 40 false positives that is 760 over 800, or 0.95; accuracy and negative predictive value use different denominators and yield different numbers.

Why A is wrong: Tempting because 760 / (760 + 60) = 0.93 uses the right numerator, but dividing by predicted negatives gives the negative predictive value, not the share of actual non-defaulters correctly cleared.

Why B is wrong: Tempting because 140 / (140 + 60) = 0.70 is a valid metric, but it is recall for the positive default class, which answers the opposite question to the one asked about non-defaulters.

Why C is wrong: Tempting because (760 + 140) / 1000 = 0.90 looks like a clean headline figure, but it is overall accuracy across both classes, not the class-specific true-negative rate the risk team requested.

Why D is correct: Correct: the question asks for the negative-class recall (specificity), which is true negatives over actual negatives, 760 / (760 + 40) = 0.95, read across the true no-default row.

Free sampleMachine Learning With RAPIDSmedium

A data scientist must train a model on tabular data already on a single GPU and is choosing between a cuML Random Forest classifier and a GPU-accelerated XGBoost classifier. The team wants a sequential boosting approach where each new tree is fitted to correct the errors of the ensemble built so far. Which choice matches that requirement, and why?

  • AChoose the cuML Random Forest, because a random forest grows its trees in sequence, with each new tree fitted to the residual errors left by the trees grown before it.
  • BChoose either model, because the cuML Random Forest and XGBoost use the same sequential boosting procedure internally and differ only in their GPU memory layout.
  • CChoose the GPU-accelerated XGBoost classifier, because boosting builds trees in sequence so each new tree is fitted to reduce the errors of the ensemble that was assembled before it. Correct
  • DChoose the cuML Random Forest, because boosting is unavailable on the GPU and only bagging ensembles such as random forests can be trained directly on the device.
Distinguish boosting in XGBoost, where trees are built sequentially on residual errors, from bagging in a random forest, where trees are independent. Boosting adds trees in sequence so each one corrects the running ensemble's errors, which is XGBoost's mechanism; a random forest instead bags independent trees on bootstrap samples and fits them in parallel, so it does not match a sequential error-correction requirement.

Why A is wrong: Tempting because both are tree ensembles, but it is wrong: a random forest grows its trees independently in parallel on bootstrap samples and does not fit later trees to the residuals of earlier ones.

Why B is wrong: Tempting because both train decision-tree ensembles on the GPU, but it is wrong: a random forest uses bagging with independent trees while XGBoost uses boosting, so they do not share the same sequential procedure.

Why C is correct: Correct: XGBoost is a gradient-boosting method that adds trees sequentially, with each new tree fitted to the gradient of the current ensemble's errors, which is exactly the sequential error-correction behaviour required.

Why D is wrong: Tempting because cuML offers a GPU random forest, but it is wrong: GPU-accelerated boosting is fully available through XGBoost, so the claim that only bagging ensembles can train on the device is false.

Other domains in this exam

See also the NCA-ADS cert hub, the study guide, and the cheat sheet.

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