NCA-ADS

Free NCA-ADS practice questions

10 questions from our NCA-ADS practice tests, each with the correct answer and a written explanation. Read them with the answers shown, or switch to quiz mode and answer first.

Back to the NCA-ADS practice exams

Question 1 of 10, Data Manipulation and Preparation

A data scientist has an existing pandas notebook that loads a 20 GB CSV, filters rows and runs several groupby aggregations. They want GPU acceleration with no code changes and automatic CPU fallback for any operation the GPU library does not support. What should they do?

  1. AInstall the RAPIDS Accelerator for Apache Spark and point the notebook kernel at it
  2. BReplace every pandas import with import cudf as pd and rewrite unsupported calls by hand
  3. CLoad the cudf.pandas extension with %load_ext cudf.pandas before importing pandas Correct answer
  4. DConvert the notebook to Dask DataFrame and call compute() after each aggregation step

Answer and explanation: The cudf.pandas accelerator mode intercepts pandas calls, runs them on the GPU through cuDF and transparently falls back to CPU pandas when an operation is unsupported, so no code changes are needed. Swapping the import to cuDF works for many calls but gives no automatic fallback, so unsupported methods fail. Dask DataFrame parallelises across CPU partitions and needs code changes. The Spark RAPIDS Accelerator applies to Spark SQL and DataFrame jobs, not to a pandas notebook.

Question 2 of 10, Data Manipulation and Preparation

A model needs a feature from a high-cardinality 'merchant_id' column with 2 million distinct values. One-hot encoding would explode memory. Which encoding is MOST appropriate for a tree-based GPU model while avoiding target leakage?

  1. ATarget encoding computed once using all labels in the full training set
  2. BOne-hot encoding followed by PCA down to fifty components
  3. CLabel encoding sorted by the alphabetical merchant name
  4. DOut-of-fold target encoding computed with cross-validation folds Correct answer

Answer and explanation: Out-of-fold target encoding replaces each category with a smoothed target statistic learned only from other folds, so it stays compact and avoids leaking each row's own label. One-hot encoding 2 million values is exactly the memory problem being avoided, even if reduced later. Target encoding on the full set leaks the label into the feature and inflates validation scores. Alphabetical label codes are compact but impose an arbitrary order that carries little signal.

Question 3 of 10, Machine Learning With RAPIDS

A binary classifier for a rare disease reports 99% accuracy on a test set with 1% positives. Which metric should the team inspect to judge whether the model actually finds positive cases?

  1. ASpecificity on the negative class
  2. BMean squared error of the class labels
  3. CRecall on the positive class Correct answer
  4. DOverall accuracy on a larger test set

Answer and explanation: Recall measures the share of actual positives the model detects, which is what matters when positives are rare; a model predicting all negatives would score 99% accuracy but 0% recall. A larger test set does not fix accuracy's insensitivity to imbalance. Mean squared error is a regression metric. Specificity measures performance on the negative majority, which is already high.

Question 4 of 10, Machine Learning With RAPIDS

Cross-validation on a GPU XGBoost model gives fold AUCs of 0.91, 0.62, 0.90, 0.89 and 0.60. Rows from the same customer appear in several folds. What is the MOST likely issue and fix?

  1. AThe learning rate is too low; raise it so all folds converge evenly
  2. BCustomer-level leakage and grouping; use GroupKFold on customer ID Correct answer
  3. CGPU nondeterminism; train on the CPU so every fold gives one score
  4. DThere are too few folds; switch to 20 folds so the scores average out

Answer and explanation: Rows from the same customer in train and validation let the model memorise customers, and uneven fold composition produces unstable scores; GroupKFold keeps each customer in one fold. Learning rate does not explain fold-to-fold swings of this size. More folds hide the variance without fixing leakage. GPU nondeterminism causes tiny differences, not 0.3 AUC gaps.

Question 5 of 10, Data Science Pipelines and Workflow Automation. Choose 2.

A nightly feature pipeline in Dask-cuDF reads raw Parquet, cleans it, joins three tables and writes features. Runs occasionally produce different row counts from the same input. Which practices make the pipeline reproducible? (Choose two.)

  1. ARun the pipeline interactively so engineers can inspect each output by eye
  2. BCall persist() on every intermediate DataFrame to keep results in memory
  3. CSet explicit random seeds and avoid nondeterministic sampling in the pipeline Correct answer
  4. DIncrease the number of Dask partitions so each task processes fewer rows
  5. EPin library versions in an environment file and record it with each run Correct answer

Answer and explanation: Pinned, recorded dependency versions and fixed seeds remove two common sources of run-to-run variation: changed library behaviour and random sampling. persist() caches data for speed but does not change results. Partition count affects parallelism, not determinism of logic. Manual interactive runs make reproducibility worse, not better.

Question 6 of 10, Descriptive Analysis and Visualization

An analyst runs a regression and finds a statistically significant coefficient for 'number of support tickets' on churn. A colleague claims tickets cause churn. What is the BEST response?

  1. AAgree, because adding more rows to the regression would always confirm the causal effect
  2. BDisagree, because regression coefficients cannot be statistically significant when outcomes are binary
  3. CAgree, because a statistically significant coefficient proves that the predictor is causal
  4. DAssociation is shown; causation needs an experiment or a causal design accounting for confounders Correct answer

Answer and explanation: A significant coefficient shows association conditional on the model, but confounders such as product problems could drive both tickets and churn; causal claims need experiments or causal methods. Significance does not prove causation. Logistic regression coefficients can be significant for binary outcomes. More data narrows intervals but does not establish causality.

Question 7 of 10, Foundations of Accelerated Data Science

A workflow repeatedly converts a cuDF DataFrame to pandas for one helper function and back to cuDF, and profiling shows most time is spent outside computation. What is the MOST likely bottleneck?

  1. AInsufficient CPU cores available for the pandas helper function
  2. BData transfers between host and device memory over the PCIe bus Correct answer
  3. CDisk I/O caused by reading the source Parquet file repeatedly
  4. DKernel launch overhead from too many small GPU threads in each block

Answer and explanation: Each to_pandas and from_pandas call copies the whole DataFrame between GPU and host memory, and these transfers often cost more than the computation itself. Kernel launch overhead is minor compared with moving gigabytes. CPU core count would show up as computation time in the helper, not transfer time. The scenario describes in-memory round trips, not repeated file reads.

Question 8 of 10, Introductory MLOps Practices

A deployed churn model's input feature 'monthly_spend' now has a noticeably different distribution than in training, though labels are not yet available. Which check detects this?

  1. AMeasure average inference latency and alert when it increases sharply
  2. BRecompute training accuracy on the original training set every day and alert on any change
  3. CCheck that the model file checksum still matches the registered version
  4. DCompare current and training feature distributions with a statistic such as PSI or a KS test Correct answer

Answer and explanation: Data drift is detected by comparing feature distributions between training and production, for example with the population stability index or a Kolmogorov-Smirnov test, and it needs no labels. Training accuracy on old data does not change. A checksum confirms the model file is unchanged, not that inputs are. Latency monitors performance, not input distribution.

Question 9 of 10, Advanced Data Structures

A forecasting team evaluates a model with a rolling-origin approach on GPU. Which description is correct?

  1. ARepeatedly train on data up to a cutoff, forecast the next window, then move the cutoff forward Correct answer
  2. BForecast all windows at once and compare them with the training data used to fit the model
  3. CRandomly choose cutoffs, train on data after each cutoff and forecast the earlier windows back
  4. DTrain once on the full history and evaluate on randomly selected days drawn from that same history

Answer and explanation: Rolling-origin (walk-forward) evaluation trains on the past up to each cutoff and tests on the following window, then advances, mimicking real forecasting. Training on later data to predict earlier windows reverses time. Evaluating on random days from the training history leaks information. Comparing forecasts with training data measures fit, not forecast skill.

Question 10 of 10, Software and Environment Management

Which file in a repository tells git to exclude large data files and local environment folders from version control?

  1. A.gitattributes
  2. Benvironment.yml
  3. C.gitignore Correct answer
  4. D.git/config

Answer and explanation: .gitignore lists path patterns that git should not track, such as data folders and local environments. .gitattributes sets per-path attributes like line endings or LFS handling. .git/config holds repository settings such as remotes. environment.yml defines a conda environment.