Courseiva

CCNA AI Models and Data Engineering Questions

75 of 81 questions · Page 1/2 · AI Models and Data Engineering · Answers revealed

1
MCQhard

A data scientist trains a deep learning model on a large dataset. The training loss decreases steadily but the validation loss starts increasing after 20 epochs. The scientist uses early stopping with patience=5. Which of the following is the MOST likely cause and best corrective action?

A.Model is overfitting; add dropout regularization.
B.Training data is not representative; collect more data.
C.Model is underfitting; increase model capacity.
D.Learning rate too high; reduce learning rate.
AnswerA

Diverging validation loss after training loss decrease is classic overfitting; dropout helps.

Why this answer

The training loss decreasing while validation loss increasing after 20 epochs is a classic sign of overfitting, where the model memorizes training data noise instead of generalizing. Early stopping with patience=5 would halt training after 5 epochs of no validation improvement, but the root cause is overfitting. Adding dropout regularization randomly drops neurons during training, forcing the network to learn more robust features and reducing overfitting.

Exam trap

CompTIA often tests the distinction between overfitting and underfitting by showing a diverging validation loss curve, and the trap here is that candidates may confuse overfitting with a learning rate issue or data quality problem, leading them to choose 'reduce learning rate' or 'collect more data' instead of the correct regularization technique.

How to eliminate wrong answers

Option B is wrong because the validation loss increasing while training loss decreases indicates overfitting, not unrepresentative data; collecting more data might help but is not the most direct corrective action for overfitting. Option C is wrong because underfitting would show high training loss that does not decrease, not a decreasing training loss with increasing validation loss. Option D is wrong because a high learning rate would typically cause training loss to oscillate or diverge, not steadily decrease; reducing learning rate addresses convergence issues, not overfitting.

2
MCQeasy

A data engineer is splitting a dataset into training, validation, and test sets for a machine learning project. The dataset is large and representative of the population. Which split ratio is commonly recommended?

A.90% training, 5% validation, 5% test
B.70% training, 20% validation, 10% test
C.50% training, 25% validation, 25% test
D.80% training, 10% validation, 10% test
AnswerD

This is a standard split, providing ample training data and reliable validation and test sets.

Why this answer

(80% training, 10% validation, 10% test) is commonly recommended for large, representative datasets because it provides sufficient data for model training while retaining enough samples in the validation and test sets to reliably evaluate model performance and detect overfitting. This split balances the need for a robust training set with the requirement for statistically meaningful holdout sets, as recommended in standard machine learning practices for AI model development.

Exam trap

CompTIA often tests the misconception that a larger validation set (e.g., 20%) is always better for tuning, but for large representative datasets, the 80/10/10 split is recommended to avoid wasting training data while still obtaining reliable evaluation metrics.

How to eliminate wrong answers

Option A (90% training, 5% validation, 5% test) is wrong because the validation and test sets are too small (only 5% each) to provide reliable performance estimates, especially for models with many hyperparameters, leading to high variance in evaluation metrics. Option B (70% training, 20% validation, 10% test) is wrong because it allocates an unnecessarily large portion (20%) to validation, which reduces training data and can degrade model accuracy, particularly when the dataset is already large and representative. Option C (50% training, 25% validation, 25% test) is wrong because it severely under-allocates data to training (only 50%), which can cause underfitting and poor generalization, and the equal split is typically reserved for smaller datasets or specific cross-validation scenarios, not for large representative datasets.

3
Multi-Selecteasy

A data scientist is cleaning a dataset. Which TWO actions are appropriate for handling missing data?

Select 2 answers
A.Ignore missing values and train the model directly.
B.Use a predictive model to estimate missing values.
C.Impute missing values with the mean of the entire dataset.
D.Delete rows with missing values if the missing rate is low.
E.Replace missing values with the most frequent value always.
AnswersB, D

Predictive imputation uses relationships in data, a valid advanced method.

Why this answer

Using a predictive model to estimate missing values is a sophisticated imputation technique that leverages relationships between features to fill gaps, preserving data integrity and avoiding bias. This approach is particularly useful when data is not missing completely at random, as it can capture complex patterns that simpler methods miss.

Exam trap

CompTIA often tests the misconception that simple imputation methods like mean or mode are always safe, when in fact they can introduce bias and distort the dataset, making predictive imputation or deletion of rows with low missing rates more appropriate depending on the context.

4
MCQeasy

A logistics company uses a machine learning model to predict delivery times based on historical data. The model was performing well, but recently it started making inaccurate predictions, especially for routes that have experienced new traffic patterns and road closures. The data engineering team receives an alert that the model's accuracy has dropped by 15% over the last week. They suspect data drift. The team has access to the original training data and a continuous stream of new data. What is the most appropriate first step for the team to take?

A.Roll back the model to the previous stable version and schedule a full audit of the data pipeline.
B.Compare the distributions of key features between the training data and the recent data to quantify data drift.
C.Immediately retrain the model using the most recent data to adapt to the new patterns.
D.Add more features to the model to capture the new traffic patterns and road closures.
AnswerB

Identifying drift by comparing distributions is the standard first step to diagnose the problem before taking corrective action.

Why this answer

The first step in diagnosing a suspected data drift is to statistically compare the distributions of key features between the training data and the recent streaming data. This quantifies whether the input data distribution has changed, which directly explains the accuracy drop. Without this analysis, any corrective action (like retraining or rollback) would be premature and could mask the root cause.

Exam trap

CompTIA often tests the misconception that the immediate response to a performance drop should be retraining or rollback, rather than first diagnosing the type of drift (data drift vs. concept drift) through distribution comparison.

How to eliminate wrong answers

Option A is wrong because rolling back the model without first confirming data drift wastes time and may not address the new traffic patterns; it assumes the previous model is still valid, which is false if drift is present. Option C is wrong because immediately retraining on recent data without verifying drift could introduce bias or overfit to transient noise, and it ignores the need to first understand what changed. Option D is wrong because adding features without first analyzing drift is a blind attempt that may not solve the distribution shift and could increase model complexity unnecessarily.

5
Multi-Selecteasy

A data scientist is evaluating a logistic regression model for binary classification on highly imbalanced data. Which TWO metrics are most appropriate to assess model performance? (Choose TWO.)

Select 2 answers
A.Accuracy
B.Recall
C.Precision
D.Mean squared error (MSE)
E.F1 score
AnswersB, C

Recall measures the proportion of actual positives correctly identified, critical for minority class performance.

Why this answer

Recall (B) is correct because in highly imbalanced binary classification, the minority class (e.g., fraud or disease) is the focus. Recall measures the proportion of actual positives correctly identified, which is critical when missing a positive has high cost. Precision (C) is correct because it measures the proportion of predicted positives that are truly positive, which is essential when false positives are costly or when the model's positive predictions must be trustworthy.

Exam trap

CompTIA often tests the misconception that accuracy is always a valid metric, or that F1 score is a primary metric rather than a derived one, leading candidates to select accuracy or F1 instead of the pair of precision and recall.

6
Multi-Selectmedium

A natural language processing (NLP) team is building a sentiment analysis model. The raw text data contains punctuation, stop words, and URLs. Which TWO preprocessing steps are most appropriate to improve model performance? (Choose two.)

Select 2 answers
A.Remove all punctuation and URLs
B.Apply stemming to reduce words to root forms
C.Remove common stop words
D.Convert all text to lowercase
E.Tokenize the text into individual words
AnswersA, C

Punctuation and URLs are typically not useful for sentiment and add noise.

Why this answer

Removing punctuation and URLs eliminates noise that does not contribute to sentiment (e.g., 'http://...' or '!!!'), allowing the model to focus on meaningful words. This step reduces vocabulary size and prevents the model from learning spurious correlations tied to formatting artifacts.

Exam trap

The AI0-001 exam often tests the distinction between mandatory preprocessing steps (like tokenization) and steps that specifically improve performance by reducing noise, leading candidates to select tokenization or lowercasing instead of the more impactful noise-removal steps.

7
MCQmedium

A machine learning team is deploying a sentiment analysis model for customer reviews. The model was trained on reviews from an e-commerce site but will be used for a social media platform. The team observes a drop in accuracy. Which concept best explains this issue?

A.Data drift
B.Concept drift
C.Bias-variance tradeoff
D.Overfitting
AnswerA

The distribution of reviews differs between e-commerce and social media.

Why this answer

Data drift occurs when the statistical properties of the input data change between the training and production environments. Here, the model was trained on e-commerce reviews but is now processing social media posts, which have different vocabulary, tone, and structure, causing a mismatch in the input distribution and leading to accuracy degradation.

Exam trap

CompTIA often tests the distinction between data drift (input distribution change) and concept drift (relationship change), and candidates mistakenly choose concept drift when the scenario describes a change in the input data source rather than a change in the underlying mapping from inputs to outputs.

How to eliminate wrong answers

Option B is wrong because concept drift refers to a change in the underlying relationship between input features and the target variable over time, not a change in the input data distribution itself. Option C is wrong because bias-variance tradeoff is a model selection concept describing the balance between underfitting and overfitting, not an explanation for performance drop due to data distribution shift. Option D is wrong because overfitting occurs when a model learns training data too well, including noise, and fails to generalize to new data from the same distribution, not to a different distribution.

8
MCQhard

A healthcare startup is deploying a machine learning model to predict patient readmission within 30 days using electronic health records (EHR). The data pipeline uses Apache Spark for preprocessing and training on an Amazon EMR cluster. The training dataset is 50 GB and composed of structured numeric and categorical features, along with unstructured clinical notes. The data scientist observes that training takes over 12 hours and frequently fails due to out-of-memory (OOM) errors, especially when processing the clinical notes via TF-IDF vectorization. The cluster has 10 nodes with 64 GB RAM each. The data engineer has already tried increasing spark.sql.shuffle.partitions to 400 and using Kryo serialization, but OOM persists. Which action should the data engineer take next to resolve the OOM errors?

A.Broadcast the TF-IDF model to all executors to avoid shuffling
B.Repartition the clinical notes data into 2000 partitions before TF-IDF
C.Add 10 more nodes to the cluster to increase total memory
D.Use a single executor with 64 GB and increase driver memory to 128 GB
AnswerB

More partitions reduce the data per executor, mitigating OOM during vectorization.

Why this answer

Repartitioning the clinical notes data into 2000 partitions before TF-IDF vectorization increases parallelism and reduces the memory pressure per partition. The default partition count (often based on spark.default.parallelism) is too low for 50 GB of data, causing individual partitions to exceed executor memory limits. By increasing partitions, each executor processes smaller chunks, preventing OOM errors during the memory-intensive TF-IDF stage.

Exam trap

CompTIA often tests the misconception that increasing cluster resources (nodes or memory) alone solves OOM errors, when the real fix is to optimize data partitioning and parallelism within Spark's execution model.

How to eliminate wrong answers

Option A is wrong because broadcasting the TF-IDF model does not address the root cause of OOM; the model itself is typically small, but the issue is the large volume of raw text data being processed per partition, not the model size. Option C is wrong because adding more nodes increases total cluster memory but does not fix the per-partition memory imbalance; without repartitioning, the same skewed partitions will still cause OOM on individual executors. Option D is wrong because using a single executor with 64 GB and increasing driver memory to 128 GB ignores the distributed nature of Spark; it would force all processing into one executor, causing severe memory contention and likely worse OOM, while also losing parallelism.

9
Multi-Selectmedium

Which THREE practices are recommended for versioning machine learning models in a production environment?

Select 3 answers
A.Use a model registry like MLflow or DVC.
B.Store model metadata such as hyperparameters and training data hash.
C.Automate model deployment based on version tags.
D.Use Git to version model binaries.
E.Keep only the latest model to save storage.
AnswersA, B, C

Model registries provide centralized versioning and lifecycle management.

Why this answer

A model registry like MLflow or DVC provides a centralized repository for tracking model versions, metadata, and lineage. This enables reproducibility, rollback, and auditability in production, which is essential for managing the lifecycle of machine learning models.

Exam trap

CompTIA often tests the misconception that Git is suitable for versioning all artifacts, including large binary model files, when in fact Git's architecture is optimized for text diffs and cannot efficiently manage model binaries in a production ML pipeline.

10
MCQeasy

A company wants to deploy an AI model for real-time inference on edge devices with limited computational resources. Which model architecture would be MOST suitable?

A.YOLOv4
B.MobileNet
C.ResNet-152
D.BERT
AnswerB

MobileNet uses depthwise separable convolutions to reduce computation, ideal for edge deployment.

Why this answer

MobileNet is specifically designed for mobile and edge devices using depthwise separable convolutions, which drastically reduce the number of parameters and computational cost while maintaining acceptable accuracy. This makes it the most suitable choice for real-time inference on resource-constrained edge hardware.

Exam trap

CompTIA often tests the misconception that any 'lightweight' or 'fast' model (like YOLOv4) is suitable for edge devices, ignoring the specific architectural optimizations (e.g., depthwise separable convolutions) that MobileNet uniquely provides for extreme resource constraints.

How to eliminate wrong answers

Option A is wrong because YOLOv4, while fast for object detection, is still a large convolutional network requiring significant GPU memory and compute, making it impractical for low-power edge devices. Option C is wrong because ResNet-152 is a very deep residual network with 152 layers, optimized for high accuracy on powerful hardware, not for limited-resource edge deployment. Option D is wrong because BERT is a transformer-based NLP model with hundreds of millions of parameters, requiring substantial memory and compute, and is not designed for real-time inference on edge devices.

11
MCQeasy

A data scientist notices that a binary classification model consistently predicts the majority class. Which data engineering technique should be applied?

A.Feature scaling
B.Dimensionality reduction
C.Polynomial features
D.Oversampling
AnswerD

Oversampling (e.g., SMOTE) creates synthetic samples of the minority class to balance the dataset.

Why this answer

Oversampling (Option D) is correct because the model's bias toward the majority class indicates a class imbalance problem. By synthetically increasing the number of minority class samples (e.g., using SMOTE or random oversampling), the training data becomes more balanced, allowing the classifier to learn decision boundaries that are not skewed toward the majority class.

Exam trap

CompTIA often tests the misconception that feature scaling or dimensionality reduction can fix class imbalance, when in reality these techniques address different issues like feature magnitude or curse of dimensionality, not skewed target distributions.

How to eliminate wrong answers

Option A is wrong because feature scaling normalizes the range of input features (e.g., via min-max scaling or standardization) but does not address class imbalance; it only prevents features with larger magnitudes from dominating gradient-based optimization. Option B is wrong because dimensionality reduction (e.g., PCA or t-SNE) reduces the number of features to combat overfitting or noise, but it does not alter the class distribution, so the majority class bias remains. Option C is wrong because polynomial features create interaction or higher-degree terms from existing features to capture non-linear relationships, but they do not change the ratio of majority to minority samples, leaving the imbalance untouched.

12
MCQmedium

A data scientist is building a regression model to predict house prices. The dataset contains features such as square footage, number of bedrooms, and year built. Initial model performance is poor, and the scientist suspects that feature engineering could help. Which approach is most likely to improve model accuracy?

A.Use only linear features because polynomial terms overfit
B.Remove all features except square footage to reduce noise
C.Create interaction terms such as bedrooms times square footage
D.Add random noise to the target variable to increase variance
AnswerC

Interaction terms capture combined effects of features, often improving regression models.

Why this answer

Creating interaction terms like bedrooms × square footage captures non-linear relationships and synergies between features that a linear model alone cannot represent. In real estate, the effect of square footage on price often depends on the number of bedrooms (e.g., a large house with few bedrooms may be less valuable), so interaction terms allow the model to learn these conditional patterns, directly improving predictive accuracy.

Exam trap

CompTIA often tests the misconception that adding more features always causes overfitting, when in fact carefully engineered interaction terms can reduce bias without excessive variance if regularized properly.

How to eliminate wrong answers

Option A is wrong because restricting to only linear features ignores potentially valuable non-linear patterns; polynomial terms can be regularized to avoid overfitting and are often necessary for complex relationships. Option B is wrong because removing all features except square footage discards important predictors like bedrooms and year built, which carry significant signal for house prices, thus increasing bias and reducing accuracy. Option D is wrong because adding random noise to the target variable artificially increases variance and corrupts the ground truth, making it harder for the model to learn the true underlying patterns and degrading performance.

13
Multi-Selecthard

Which TWO strategies are effective for handling missing values in a dataset when the missingness is not random (MNAR)?

Select 2 answers
A.Multiple imputation using chained equations
B.Treat missing as a separate category (e.g., for categorical features)
C.Listwise deletion
D.KNN imputation
E.Mean imputation
AnswersA, B

Multiple imputation can handle MNAR if the imputation model incorporates variables that predict missingness.

Why this answer

Multiple imputation using chained equations (MICE) is effective for MNAR because it models each variable with missing values as a function of other variables, iteratively generating plausible values that preserve the relationships and uncertainty in the data. This approach can account for the systematic pattern of missingness by incorporating auxiliary variables that are correlated with both the missing values and the missingness mechanism, making it robust even when missingness depends on unobserved data.

Exam trap

CompTIA often tests the misconception that mean imputation or KNN imputation are safe defaults for any missing data pattern, but the trap here is that MNAR requires methods that explicitly model the missingness mechanism, which simple imputation techniques fail to do.

14
MCQhard

Refer to the exhibit. A data engineer notices that the batch processing step is taking too long and causing delays. Which change would most likely reduce the latency?

A.Increase the parallelism of the Spark job
B.Move feature engineering to the stream processing step in Flink
C.Replace Apache Flink with Apache Storm for stream processing
D.Change the output format from Parquet to CSV
AnswerB

Performing feature engineering in stream reduces batch processing time and overall latency.

Why this answer

Moving feature engineering from the batch Spark job to the stream processing Flink job reduces the workload on the batch step, making it faster. Replacing Flink, increasing parallelism, or changing output format do not address the bottleneck as effectively.

15
Multi-Selecteasy

A data engineer is preparing a dataset for a binary classification model. The dataset has 10,000 samples with 100 features. To improve model performance and reduce training time, the engineer decides to perform feature selection. Which two techniques are appropriate for this task? (Select TWO).

Select 2 answers
A.Normalization
B.Recursive Feature Elimination (RFE)
C.L1 Regularization
D.One-Hot Encoding
E.Principal Component Analysis (PCA)
AnswersB, C

RFE selects features by removing the least important ones iteratively.

Why this answer

Recursive Feature Elimination (RFE) is an appropriate feature selection technique because it iteratively removes the least important features based on a model's feature importance scores or coefficients, directly reducing the feature count from 100 to a smaller subset. This improves model performance by eliminating irrelevant or redundant features and reduces training time by decreasing dimensionality.

Exam trap

CompTIA often tests the distinction between feature selection (keeping original features) and dimensionality reduction (creating new features), so candidates mistakenly select PCA thinking it selects features, when it actually transforms them into principal components.

16
MCQmedium

A data engineer needs to design a data pipeline for a real-time fraud detection system. The system requires low-latency processing of streaming transactions. Which architecture is most appropriate?

A.Stream processing with Apache Kafka and Flink
B.Data lake with Apache Spark
C.Batch processing with Apache Hadoop
D.Microservices architecture with REST APIs
AnswerA

Stream processing provides low-latency real-time analysis.

Why this answer

Apache Kafka provides a distributed, fault-tolerant event streaming platform that ingests high-throughput transaction data with low latency, while Apache Flink offers true stream processing with exactly-once semantics and sub-second event-time processing. Together, they enable real-time fraud detection by analyzing transactions as they arrive, without the delays inherent in batch or micro-batch approaches.

Exam trap

CompTIA often tests the distinction between true stream processing (e.g., Flink, Kafka Streams) and micro-batch or near-real-time processing (e.g., Spark Streaming), where candidates mistakenly assume that any 'streaming' API (like Spark Streaming) is equivalent to low-latency stream processing.

How to eliminate wrong answers

Option B is wrong because a data lake with Apache Spark typically relies on micro-batch processing (e.g., Spark Streaming with a minimum batch interval of ~100ms), which introduces higher latency than true stream processing and is unsuitable for sub-second fraud detection. Option C is wrong because batch processing with Apache Hadoop (e.g., MapReduce) is designed for high-throughput, high-latency processing of large static datasets, not for real-time streaming where transactions must be evaluated within milliseconds. Option D is wrong because microservices architecture with REST APIs is a design pattern for building distributed services, not a data pipeline technology; REST APIs introduce synchronous request-response overhead and cannot natively handle continuous, unbounded data streams with low-latency stateful processing.

17
MCQhard

A fraud detection model has high precision but low recall. The cost of false negatives is very high. Which threshold adjustment should be made?

A.Use class weights during training
B.Apply SMOTE to the training data
C.Decrease classification threshold
D.Increase classification threshold
AnswerC

Decreasing the threshold increases the number of positive predictions, raising recall and reducing false negatives.

Why this answer

Decreasing the classification threshold makes the model more sensitive, classifying more instances as positive. This increases recall by catching more true positives, directly addressing the high cost of false negatives, even though precision may drop.

Exam trap

The AI0-001 exam often tests the distinction between training-time techniques (like class weights or SMOTE) and post-training threshold tuning, trapping candidates who confuse data-level remedies with decision boundary adjustments.

How to eliminate wrong answers

Option A is wrong because using class weights during training rebalances the loss function to penalize false negatives more, which is a training-time adjustment, not a post-training threshold change. Option B is wrong because SMOTE oversamples the minority class in the training data to address class imbalance, which is a data preprocessing step, not a threshold adjustment. Option D is wrong because increasing the classification threshold makes the model more conservative, reducing false positives but further lowering recall, which worsens the false negative problem.

18
MCQhard

A machine learning team is developing a model to predict server failure from telemetry data. They use a deep neural network with 3 hidden layers. After training, the model achieves 99% accuracy on training data but only 85% on validation data. Which technique should the team apply to reduce the generalization error?

A.Increase the number of hidden layers
B.Apply L2 regularization
C.Increase the learning rate
D.Add more training data
AnswerB

Regularization adds a penalty on large weights, reducing overfitting and improving generalization.

Why this answer

The model exhibits high variance (overfitting) because it achieves 99% accuracy on training data but only 85% on validation data. L2 regularization (also known as weight decay) adds a penalty proportional to the squared magnitude of the weights to the loss function, which discourages the network from fitting noise in the training data and improves generalization. This directly reduces the gap between training and validation performance.

Exam trap

CompTIA often tests the distinction between techniques that address overfitting (regularization) versus those that address underfitting (more layers, higher learning rate) or data quantity, leading candidates to mistakenly choose adding more data or increasing model complexity.

How to eliminate wrong answers

Option A is wrong because increasing the number of hidden layers would increase model capacity, making overfitting worse and further increasing generalization error. Option C is wrong because increasing the learning rate can cause the optimizer to overshoot minima or diverge, but it does not directly address overfitting; it may even prevent convergence. Option D is wrong because while adding more training data can help reduce overfitting, it is not the most direct or practical technique when the team already has a model that overfits; regularization is a more immediate and targeted solution.

19
MCQhard

A credit risk model is being developed to predict loan defaults. The dataset has 95% non-default and 5% default instances. The data scientist trains a logistic regression model and obtains 95% accuracy, but the recall for defaults is only 10%. Which action is most appropriate to improve the model's ability to identify defaults?

A.Apply principal component analysis (PCA) to reduce dimensionality
B.Collect more data from loan applicants to increase dataset size
C.Undersample the non-default class to match the number of defaults
D.Use SMOTE to oversample the default class
AnswerD

SMOTE creates synthetic samples, balancing classes and improving recall.

Why this answer

SMOTE (Synthetic Minority Oversampling Technique) is the most appropriate action because it generates synthetic samples for the minority class (defaults) rather than simply duplicating existing ones. This directly addresses the severe class imbalance (95% non-default vs. 5% default) that causes the logistic regression model to achieve high accuracy by predicting nearly all instances as non-default, while failing to identify actual defaults (recall of only 10%). By creating realistic synthetic default instances, SMOTE balances the training data and forces the model to learn decision boundaries that better capture the minority class.

Exam trap

CompTIA often tests the misconception that undersampling the majority class is always better than oversampling the minority class, but in this scenario, undersampling would discard valuable non-default patterns and reduce model robustness, whereas SMOTE generates new, realistic default samples without data loss.

How to eliminate wrong answers

Option A is wrong because PCA reduces dimensionality by projecting data onto principal components, which does not address class imbalance and can even discard variance that distinguishes defaults from non-defaults. Option B is wrong because simply collecting more data does not guarantee a better ratio of defaults; if the underlying population imbalance remains, the model will still be biased toward the majority class. Option C is wrong because undersampling the non-default class discards a large amount of potentially useful data, which can lead to loss of information and reduced model performance, especially when the majority class contains important patterns.

20
MCQeasy

A company streams sensor data from IoT devices. The data arrives as JSON messages at high velocity. Which data pipeline architecture is BEST suited to handle this streaming data for near-real-time analytics?

A.Batch processing using Hadoop MapReduce every 24 hours.
B.Batch processing using nightly ETL jobs.
C.Single-node database with periodic inserts.
D.Stream processing using Apache Kafka and Spark Streaming.
AnswerD

Kafka ingests streaming data, Spark Streaming processes it with low latency.

Why this answer

Apache Kafka acts as a distributed, fault-tolerant ingestion layer that can handle high-velocity JSON messages, while Spark Streaming processes the data in micro-batches for near-real-time analytics. This combination provides the low-latency, scalable pipeline required for streaming IoT sensor data, unlike batch or single-node approaches.

Exam trap

CompTIA often tests the distinction between batch and stream processing by presenting batch options that seem 'reliable' or 'traditional,' trapping candidates who overlook the explicit 'near-real-time' requirement in the question.

How to eliminate wrong answers

Option A is wrong because Hadoop MapReduce is designed for batch processing of large static datasets, not for continuous high-velocity streaming data, and a 24-hour cycle cannot meet near-real-time requirements. Option B is wrong because nightly ETL jobs introduce hours of latency, making them unsuitable for near-real-time analytics on streaming data. Option C is wrong because a single-node database with periodic inserts cannot scale to handle high-velocity IoT data streams and will become a bottleneck, failing to provide near-real-time processing.

21
MCQmedium

An organization uses a machine learning model to approve loans. The model shows higher false positive rates for a protected group. Which data engineering step should be taken to mitigate this?

A.Remove the protected attribute from training data
B.Use adversarial debiasing technique
C.Increase model complexity
D.Add synthetic data to balance groups
AnswerB

Adversarial debiasing forces the model to be invariant to protected attributes, reducing bias.

Why this answer

Adversarial debiasing is a technique that trains the model to minimize prediction error while simultaneously preventing an adversary from predicting the protected attribute from the model's outputs. This directly reduces disparate impact by forcing the model to learn representations that are uncorrelated with the protected group, thereby lowering false positive rates for that group without simply removing the attribute.

Exam trap

A common misconception tested in CompTIA AI is that removing the protected attribute is sufficient to eliminate bias, when in reality proxy features and correlated variables can perpetuate discrimination, making adversarial debiasing a more robust solution.

How to eliminate wrong answers

Option A is wrong because simply removing the protected attribute from training data does not eliminate proxy features (e.g., zip code, income) that correlate with the protected group, so bias can persist through correlated features. Option C is wrong because increasing model complexity typically exacerbates overfitting and can amplify existing biases rather than mitigate them, as the model may learn spurious correlations tied to the protected group. Option D is wrong because adding synthetic data to balance groups addresses class imbalance but does not directly correct the model's decision boundary bias that causes higher false positives for a specific group; it may even introduce artifacts if synthetic data is not carefully generated.

22
MCQmedium

Refer to the exhibit. A stream processor ingests events. One event arrives with missing "user_id". What will happen?

A.The event will be stored in a dead-letter queue automatically.
B.The event will be accepted but user_id will be set to null.
C.The event will be accepted with a default user_id of 0.
D.The event will be rejected because user_id is required.
AnswerD

Validation against the required field causes rejection.

Why this answer

In stream processing systems like Apache Kafka or AWS Kinesis, if a required field such as 'user_id' is missing and the schema (e.g., Avro, JSON Schema) defines it as required, the event will be rejected at ingestion. The stream processor typically validates the event against the schema; if validation fails, the event is not accepted into the stream, preventing downstream processing errors.

Exam trap

CompTIA often tests the misconception that stream processors automatically handle missing fields by setting defaults or using dead-letter queues, but the correct behavior is strict rejection when the field is required by the schema.

How to eliminate wrong answers

Option A is wrong because a dead-letter queue is not automatically used for missing required fields; it is typically configured for events that fail processing after ingestion, not for schema validation failures at ingestion time. Option B is wrong because setting user_id to null would violate the required constraint; stream processors do not automatically coerce missing required fields to null unless explicitly configured with a default value. Option C is wrong because assigning a default user_id of 0 is not standard behavior; default values must be explicitly defined in the schema, and without such definition, the event is rejected.

23
MCQmedium

A team is building a regression model to predict house prices. The dataset includes numerical features (square footage, number of bedrooms) and categorical features (neighborhood, roof type). The categorical features have high cardinality (neighborhood has 200+ unique values). Which encoding strategy should the team use to avoid overfitting and maintain model interpretability?

A.Target encoding with regularization.
B.Label encoding.
C.Binary encoding.
D.One-hot encoding with feature selection.
AnswerA

Target encoding condenses categories using target mean, and regularization prevents overfitting.

Why this answer

Target encoding with regularization is the best choice because it replaces each categorical value with the mean of the target variable for that category, which captures the relationship between the category and house prices. Regularization (e.g., adding a prior or using cross-validation) shrinks the encoded values toward the global mean, preventing overfitting on rare categories (e.g., neighborhoods with only a few houses). This maintains interpretability because each encoded value directly reflects the average price impact of that category, unlike black-box embeddings.

Exam trap

CompTIA often tests the misconception that one-hot encoding is always safe for categorical variables, but here the high cardinality (200+ neighborhoods) makes one-hot encoding impractical and prone to overfitting, leading candidates to overlook target encoding with regularization as the correct solution.

How to eliminate wrong answers

Option B (Label encoding) is wrong because it assigns arbitrary integer labels to categories (e.g., neighborhood 1, 2, 3), which implies an ordinal relationship that does not exist, misleading the regression model into treating categories as ordered numeric features. Option C (Binary encoding) is wrong because while it reduces dimensionality compared to one-hot, it still creates multiple binary columns per category, which can lead to overfitting with high-cardinality features and does not directly capture the target relationship, reducing interpretability. Option D (One-hot encoding with feature selection) is wrong because one-hot encoding with 200+ neighborhoods would create over 200 dummy variables, causing extreme sparsity and high risk of overfitting even after feature selection, and feature selection methods (e.g., Lasso) may discard important rare categories, losing signal.

24
MCQhard

An e-commerce company needs to update its recommendation model continuously as user preferences change. The model currently retrains from scratch every night, but the training time is too long. Which approach would reduce training time while keeping the model up-to-date?

A.Use dimensionality reduction on features.
B.Implement incremental learning using online gradient descent.
C.Switch to a simpler model.
D.Increase the batch size for retraining.
AnswerB

Online learning updates the model incrementally, avoiding full retrain.

Why this answer

Incremental learning using online gradient descent updates the model parameters with each new data point or mini-batch, avoiding the need to retrain from scratch. This approach significantly reduces training time while continuously adapting to changing user preferences, making it ideal for real-time recommendation systems.

Exam trap

CompTIA often tests the misconception that dimensionality reduction or simpler models are the primary solution for reducing training time, when in fact incremental learning directly addresses the need for continuous updates without full retraining.

How to eliminate wrong answers

Option A is wrong because dimensionality reduction reduces the number of features but does not eliminate the need to retrain the entire model from scratch each night; the training time savings are marginal and the core problem of full retraining remains. Option C is wrong because switching to a simpler model may reduce training time but typically sacrifices model accuracy and expressiveness, which is critical for capturing nuanced user preferences in recommendations. Option D is wrong because increasing the batch size for retraining can actually increase memory usage and may not reduce overall training time if the model still retrains from scratch nightly; it does not address the fundamental inefficiency of full retraining.

25
MCQhard

A medical imaging team is developing an AI model to detect tumors from CT scans. They have 10,000 labeled scans, but the labels were created by a semi-automated process with an estimated 20% error rate (mislabeled tumor vs. no tumor). The team trains a convolutional neural network (CNN) and achieves 90% accuracy on a held-out test set that was carefully validated by an expert radiologist. However, when deployed to a new hospital's patient population, the accuracy drops to 70%. The team suspects domain shift and label noise. Which strategy is most likely to improve model robustness for the new hospital?

A.Use active learning to select the most uncertain predictions from the new hospital's data, then have an expert radiologist correct those labels
B.Randomly select 1,000 scans from the new hospital and have them re-labeled by the radiologist
C.Collect 20,000 more scans with the same semi-automated labeling process
D.Reduce the CNN's number of layers and apply dropout to combat overfitting
AnswerA

Active learning targets the most informative samples, maximizing improvement per expert effort.

Why this answer

Active learning selects the most uncertain predictions from the new hospital's data, allowing an expert radiologist to efficiently correct the most informative labels. This directly addresses both label noise (by correcting mislabeled examples) and domain shift (by focusing on samples where the model is uncertain in the new domain). Option B is wrong because random selection may not target the most impactful errors, wasting expert effort.

Option C is wrong because adding more noisy labels from the same flawed process will amplify label noise without correcting the domain shift. Option D is wrong because reducing model complexity and dropout are regularization techniques that do not fix label noise or domain shift.

26
MCQhard

A team is training a deep neural network on a large image dataset. They observe that the training loss decreases smoothly but validation loss oscillates. Which regularization technique should be applied?

A.Data augmentation
B.L1 regularization
C.Dropout
D.Batch normalization
AnswerC

Dropout reduces overfitting by randomly dropping units during training, forcing the network to learn robust features.

Why this answer

Dropout is the correct regularization technique because it randomly drops neurons during training, which prevents co-adaptation of features and reduces overfitting. This addresses the validation loss oscillation (a sign of overfitting) while allowing the training loss to decrease smoothly, as dropout only applies during training and not during validation.

Exam trap

The trap here is that candidates often confuse batch normalization as a regularization technique because it can reduce overfitting slightly due to its noise injection, but it is primarily for training stability, not a dedicated regularizer like dropout.

How to eliminate wrong answers

Option A is wrong because data augmentation increases the diversity of the training dataset by applying transformations (e.g., rotations, flips), which can improve generalization but does not directly regularize the network to reduce validation loss oscillation caused by overfitting. Option B is wrong because L1 regularization adds a penalty proportional to the absolute value of weights, promoting sparsity, but it does not specifically address the oscillating validation loss pattern; it is more suited for feature selection. Option D is wrong because batch normalization normalizes layer inputs to stabilize training and accelerate convergence, but it is not a regularization technique; it does not prevent overfitting or reduce validation loss oscillation.

27
MCQeasy

A data scientist is preparing a dataset for training a classification model. The dataset has a column with missing values in 5% of rows. Which action should the data engineer take to minimize bias?

A.Impute missing values with the median of the column
B.Remove all rows with missing values
C.Replace missing values with a constant such as 999
D.Use a model that can handle missing values natively
AnswerA

Median imputation preserves the central tendency without being affected by outliers, suitable for low missing rate.

Why this answer

Imputing with the median preserves the distribution without significantly reducing sample size, minimizing bias. Removing rows reduces sample size, constant 999 introduces artificial outlier, and native handling may not be available.

28
MCQeasy

During feature engineering, a data scientist creates a new feature that is a linear combination of two existing features. What risk does this pose to the model?

A.Multicollinearity
B.Data leakage
C.Overfitting
D.Underfitting
AnswerA

Multicollinearity occurs when features are highly correlated, causing unstable estimates and inflated variances.

Why this answer

Creating a new feature as a linear combination of two existing features introduces perfect multicollinearity, where the new feature is an exact linear function of the original ones. This violates the assumption of no perfect multicollinearity in linear models, causing the design matrix to become singular and making coefficient estimates unstable or impossible to compute. Even in non-linear models, high multicollinearity can inflate variance and reduce interpretability.

Exam trap

CompTIA often tests the distinction between multicollinearity and overfitting, trapping candidates who confuse feature redundancy with model complexity.

How to eliminate wrong answers

Option B is wrong because data leakage refers to using information from outside the training set (e.g., future data or target leakage), not to relationships among features within the training data. Option C is wrong because overfitting is caused by a model learning noise or overly complex patterns, not by linear dependencies between features; multicollinearity primarily affects coefficient stability, not generalization error directly. Option D is wrong because underfitting occurs when a model is too simple to capture underlying patterns, whereas multicollinearity is a data structure issue that can actually increase model complexity without improving fit.

29
MCQhard

A financial institution is building a fraud detection system using a supervised learning model. The dataset is highly imbalanced with 99.9% legitimate transactions and 0.1% fraudulent ones. Which approach would be MOST effective to train the model to detect fraud?

A.Train the model using accuracy as the performance metric
B.Undersample the legitimate transactions to match the number of fraudulent ones
C.Use SMOTE to generate synthetic fraudulent transactions
D.Increase the regularization strength in the model
AnswerC

SMOTE creates synthetic samples of the minority class, effectively balancing the dataset without losing data.

Why this answer

SMOTE (Synthetic Minority Oversampling Technique) is the most effective approach because it generates synthetic fraudulent transactions by interpolating between existing minority class samples, thereby balancing the dataset without losing information. This allows the model to learn decision boundaries for fraud detection more effectively than simple undersampling or metric adjustments, especially given the extreme 99.9% vs 0.1% imbalance.

Exam trap

CompTIA often tests the misconception that simply changing the performance metric (like using F1-score or precision-recall) alone is sufficient to handle imbalance, but the trap here is that without addressing the data distribution itself, the model still lacks sufficient fraudulent examples to learn meaningful patterns.

How to eliminate wrong answers

Option A is wrong because accuracy is a misleading metric for highly imbalanced datasets; a model that predicts all transactions as legitimate would achieve 99.9% accuracy but detect zero fraud. Option B is wrong because undersampling the majority class to match the 0.1% fraud rate would discard 99.8% of legitimate transactions, causing severe information loss and poor generalization to real-world data. Option D is wrong because increasing regularization strength reduces model complexity to prevent overfitting, but it does not address the class imbalance; the model would still be biased toward the majority class and fail to learn fraud patterns.

30
MCQhard

A healthcare company is developing a predictive model to identify patients at risk of readmission within 30 days. The data engineering team has built a pipeline that collects data from multiple sources, including electronic health records (EHR), lab results, and wearable device data. During initial testing, the model's performance is poor, with high false positives. Upon investigation, the team discovers that the data contains significant temporal misalignment: lab results are timestamped when ordered, not when collected; wearable data is aggregated hourly; and EHR data has inconsistent update frequencies. The data pipeline currently joins all features on the patient ID without aligning timestamps. The data volume is large, and processing time is a concern. Which action should the data engineering team take to most effectively address the issue and improve model performance?

A.Discard all records where timestamps do not match exactly across sources, and only use records with perfect alignment.
B.Implement a window-based feature aggregation (e.g., 6-hour windows) and align all features to the same time windows before joining.
C.Leave the pipeline unchanged and instead adjust the model's classification threshold to reduce false positives.
D.Use a data imputation algorithm to fill in missing timestamps and then join on the nearest timestamp.
AnswerB

This creates consistent timestamps and reduces noise through aggregation, effectively addressing misalignment.

Why this answer

Implementing a window-based feature aggregation with consistent time windows (e.g., 6-hour or 12-hour) and aligning all data to those windows before joining ensures temporal consistency and reduces noise. This approach addresses the root cause of misalignment while managing data volume through aggregation. Simply discarding data or padding with zeros loses valuable information.

Using an interpolation algorithm may introduce unrealistic values for irregularly sampled data. Leaving the pipeline as-is and tuning the model does not fix the data quality issue.

31
MCQeasy

A data engineer needs to combine two datasets, each with unique customer_id, to include all records from both datasets. Which join type should be used?

A.FULL OUTER JOIN
B.RIGHT JOIN
C.LEFT JOIN
D.INNER JOIN
AnswerA

FULL OUTER JOIN includes all records from both tables, matching where possible and filling nulls elsewhere.

Why this answer

A FULL OUTER JOIN returns all records from both datasets, matching rows where the customer_id is present in both and filling in NULLs for missing matches. This is the only join type that guarantees every unique customer_id from either dataset appears in the result, which is exactly what the requirement specifies.

Exam trap

CompTIA often tests the misconception that LEFT JOIN or RIGHT JOIN can include all records from both datasets, but candidates forget that these asymmetric joins exclude non-matching rows from the opposite side.

How to eliminate wrong answers

Option B (RIGHT JOIN) is wrong because it returns only all rows from the right dataset and matching rows from the left, omitting any customer_id that exists only in the left dataset. Option C (LEFT JOIN) is wrong because it returns only all rows from the left dataset and matching rows from the right, omitting any customer_id that exists only in the right dataset. Option D (INNER JOIN) is wrong because it returns only rows where customer_id exists in both datasets, discarding all non-matching records from either side.

32
Multi-Selectmedium

Which THREE are common data preprocessing steps in a machine learning pipeline? (Choose 3)

Select 3 answers
A.Hyperparameter tuning
B.Encoding categorical variables
C.Model evaluation
D.Scaling numeric features
E.Handling missing values
AnswersB, D, E

Categorical data must be converted to numeric.

Why this answer

Encoding categorical variables is a common data preprocessing step because machine learning algorithms require numerical input. Techniques like one-hot encoding or label encoding convert categorical data (e.g., colors, countries) into numeric format, enabling the model to process them correctly. Without this step, the model would misinterpret categorical labels as ordinal or meaningless numeric values.

Exam trap

CompTIA often tests the distinction between preprocessing steps (data cleaning, transformation) and later pipeline stages (model tuning, evaluation), so candidates mistakenly select hyperparameter tuning or model evaluation as preprocessing steps.

33
Multi-Selectmedium

Which THREE are common causes of data leakage in machine learning pipelines?

Select 3 answers
A.Using time-based splitting for sequential data
B.Using future information to predict the present
C.Using cross-validation on the entire dataset
D.Applying normalization before splitting data into train and test sets
E.Including features that are directly derived from the target variable
AnswersB, D, E

Using data that would not be available at prediction time is a direct form of leakage.

Why this answer

Using future information to predict the present is a classic form of data leakage. In time series or sequential data, if a model is trained on features that include values from a later time point, it gains access to information that would not be available at prediction time, leading to overly optimistic performance metrics and poor generalization.

Exam trap

CompTIA often tests the distinction between valid data splitting practices and actual leakage causes, so candidates may incorrectly select time-based splitting (Option A) as a leakage cause when it is actually a proper technique for sequential data.

34
MCQmedium

A team is training a language model using a large text corpus. They want to ensure the model does not learn biased associations between gender and professions. Which data engineering technique should they apply?

A.Remove all gender-related words from the text
B.Use a pre-trained model that is already debiased
C.Apply adversarial debiasing during training
D.Balance the representation of professions across genders
AnswerD

Balancing ensures the model sees equal examples of each gender across professions, reducing biased correlations.

Why this answer

Balancing the representation of professions across genders in the training data directly addresses the root cause of biased associations. By ensuring that each profession appears with roughly equal frequency for all gender references, the model learns statistical correlations that are fair rather than skewed by imbalanced data. This is a fundamental data engineering technique for bias mitigation, as it prevents the model from encoding spurious correlations between gender and occupation.

Exam trap

CompTIA AI often tests the distinction between data-level interventions (like balancing) and model-level interventions (like adversarial debiasing), trapping candidates who confuse training-time algorithms with data engineering techniques.

How to eliminate wrong answers

Option A is wrong because removing all gender-related words eliminates necessary context for the model to understand language, and it does not prevent the model from learning biased associations from remaining contextual clues (e.g., pronouns in surrounding sentences). Option B is wrong because using a pre-trained model that is already debiased does not guarantee the model will remain unbiased on the specific downstream task or dataset; debiasing is often incomplete and may not transfer to new data distributions. Option C is wrong because adversarial debiasing is a training-time technique that modifies the model's internal representations, not a data engineering technique; it operates on the model architecture and loss function, not on the dataset itself.

35
MCQeasy

A data analyst is cleaning a dataset and finds that 20% of the values for the 'age' column are missing. Which imputation method is most robust if the data is not normally distributed?

A.Mean imputation
B.Median imputation
C.Mode imputation
D.Remove rows with missing values
AnswerB

Median is robust to non-normal distributions.

Why this answer

Median imputation is the most robust method for handling missing values in the 'age' column when the data is not normally distributed because the median is unaffected by outliers or skewness. Unlike the mean, which is sensitive to extreme values, the median provides a central tendency measure that better represents the typical value in non-normal distributions, preserving the dataset's integrity for downstream modeling.

Exam trap

CompTIA often tests the misconception that mean imputation is always the default or best choice for numerical data, but the trap here is that candidates overlook the importance of distribution shape and outlier sensitivity, leading them to select mean imputation despite the data not being normally distributed.

How to eliminate wrong answers

Option A is wrong because mean imputation assumes a normal distribution and is highly sensitive to outliers, which can introduce bias and distort the dataset's variance when the data is skewed. Option C is wrong because mode imputation is typically used for categorical data, not continuous variables like age, and it can lead to loss of granularity and inaccurate representation of the distribution. Option D is wrong because removing rows with missing values reduces sample size and can introduce selection bias, especially if the missingness is not completely at random, which is inefficient and may degrade model performance.

36
MCQmedium

A financial institution is training a risk assessment model. The dataset includes customer credit scores, income, age, and past loan defaults. During feature engineering, a data engineer creates a new feature 'income_to_debt_ratio'. Which type of feature engineering technique is this?

A.Feature encoding
B.Feature scaling
C.Feature selection
D.Feature combination
AnswerD

Creating a ratio from two continuous variables is a combination technique to capture interaction.

Why this answer

'income_to_debt_ratio' is created by combining two existing features (income and debt) into a single derived feature. This is a classic example of feature combination (also known as feature crossing or feature construction), where arithmetic operations or logical rules are applied to existing variables to generate new predictive signals. The goal is to capture interactions or relationships that the original features alone may not express linearly.

Exam trap

CompTIA often tests the distinction between feature engineering techniques by presenting a derived feature and expecting candidates to recognize it as feature combination rather than confusing it with scaling or encoding.

How to eliminate wrong answers

Option A is wrong because feature encoding transforms categorical variables into numerical representations (e.g., one-hot encoding, label encoding), not create new numerical ratios from existing numerical features. Option B is wrong because feature scaling normalizes or standardizes the range of feature values (e.g., min-max scaling, z-score normalization) without generating new features. Option C is wrong because feature selection reduces the number of features by choosing a subset of the original ones (e.g., using correlation analysis or recursive feature elimination), not by engineering new derived attributes.

37
MCQmedium

A company is deploying an AI model to recommend products. The model's training data included historical purchases from the past two years, but the business environment has changed significantly due to a market shift. What is the most likely issue affecting model performance?

A.Concept drift
B.Overfitting
C.Underfitting
D.Data leakage
AnswerA

Concept drift is the change in the underlying relationship between features and target variable over time, making the model outdated.

Why this answer

Concept drift occurs when the statistical properties of the target variable change over time, degrading model performance. In this scenario, the market shift alters customer purchasing patterns, making the historical training data (from the past two years) no longer representative of current behavior. This is the most likely issue because the model's recommendations will be based on outdated correlations.

Exam trap

The AI0-001 exam often tests the distinction between concept drift and data leakage, where candidates mistakenly attribute performance degradation to a data contamination issue rather than a shift in the underlying data distribution.

How to eliminate wrong answers

Option B is wrong because overfitting refers to a model that memorizes training data noise and fails to generalize, but the problem here is a change in the underlying data distribution, not excessive complexity. Option C is wrong because underfitting means the model is too simple to capture patterns in the training data, whereas the issue is that the training data itself no longer reflects the current environment. Option D is wrong because data leakage involves the accidental inclusion of future information in the training set, which is not described; the problem is a temporal shift in the data distribution, not a data contamination issue.

38
Multi-Selectmedium

A data science team is building a model to predict customer churn. The dataset includes categorical variables like 'region' and 'subscription_type'. Which three preprocessing steps should be applied to these categorical features? (Select THREE).

Select 3 answers
A.Normalization
B.Label encoding
C.Standard scaling
D.Ordinal encoding
E.One-hot encoding
AnswersB, D, E

Label encoding assigns integers to each category, suitable for ordinal categories.

Why this answer

Label encoding (B) is correct because it converts each unique category in a categorical variable into a unique integer, which is a simple and memory-efficient way to prepare categorical data for machine learning models. Ordinal encoding (D) is correct for categorical variables with a natural order, such as 'subscription_type' if tiers exist (e.g., basic, premium, enterprise), preserving ordinal relationships. One-hot encoding (E) is correct for nominal categorical variables like 'region' where no order exists, creating binary columns for each category to avoid implying false ordinality.

Exam trap

CompTIA often tests the distinction between ordinal and nominal categorical variables, trapping candidates who apply label encoding to nominal data or one-hot encoding to ordinal data without considering the feature's inherent order.

39
MCQmedium

A dataset for a binary classification problem has 95% of samples in class "0" and 5% in class "1". The data scientist trains a logistic regression model and achieves 95% accuracy. Which metric should the scientist primarily use to evaluate model performance?

A.Precision, recall, and F1-score.
B.R-squared.
C.Accuracy.
D.Mean squared error.
AnswerA

These metrics evaluate performance on the minority class, crucial for imbalanced data.

Why this answer

In a highly imbalanced dataset (95% class 0, 5% class 1), accuracy is misleading because a model can achieve 95% accuracy by simply predicting the majority class for all samples. Precision, recall, and F1-score provide a more nuanced view of performance on the minority class, which is typically the class of interest in binary classification problems. The F1-score, in particular, balances precision and recall, making it the primary metric for evaluating model effectiveness on imbalanced data.

Exam trap

CompTIA often tests the concept that accuracy is a poor metric for imbalanced datasets, trapping candidates who assume high accuracy always indicates good model performance without considering class distribution.

How to eliminate wrong answers

Option B is wrong because R-squared is a metric for regression models, measuring the proportion of variance in the dependent variable explained by the independent variables, and is not applicable to classification tasks. Option C is wrong because accuracy is not a reliable metric for imbalanced datasets; a model that always predicts the majority class can achieve high accuracy without actually learning meaningful patterns, as seen with the 95% accuracy matching the class distribution. Option D is wrong because mean squared error (MSE) is a loss function for regression problems, used to quantify the average squared difference between predicted and actual continuous values, and is not appropriate for evaluating binary classification outputs.

40
MCQeasy

A team is building a regression model to predict house prices. Which data transformation is most appropriate if the target variable exhibits right skewness?

A.Principal component analysis (PCA)
B.Standardization (Z-score)
C.One-hot encoding
D.Log transformation
AnswerD

Log transformation reduces right skewness by compressing large values.

Why this answer

Log transformation is the most appropriate technique for right-skewed target variables because it compresses the long tail, making the distribution more symmetric and closer to Gaussian. This stabilizes variance and often improves the performance of regression models that assume normally distributed errors, such as linear regression.

Exam trap

CompTIA often tests the misconception that standardization can fix skewness, but candidates must remember that standardization only rescales the data, not reshape its distribution.

How to eliminate wrong answers

Option A is wrong because Principal Component Analysis (PCA) is a dimensionality reduction technique for features, not a transformation applied to the target variable; it does not address skewness in the target. Option B is wrong because Standardization (Z-score) centers and scales the data but does not change the shape of the distribution, so it cannot correct right skewness. Option C is wrong because One-hot encoding is used to convert categorical variables into numerical format, not to transform a continuous target variable.

41
Multi-Selectmedium

A team is developing a natural language processing model to classify customer feedback. The dataset contains text in multiple languages. Which THREE preprocessing steps are essential to ensure the model performs well across all languages?

Select 3 answers
A.One-hot encoding
B.Lowercasing
C.Tokenization
D.Stemming
E.Removing stop words
AnswersB, C, E

Lowercasing reduces vocabulary size and helps generalize across different cases.

Why this answer

Lowercasing is essential because it normalizes text across languages by converting all characters to the same case, reducing vocabulary size and ensuring that words like 'Good' and 'good' are treated identically. This prevents the model from learning separate representations for case variations, which is critical for multilingual datasets where case usage may differ (e.g., German capitalizes nouns). Without lowercasing, the model's performance degrades due to sparsity and increased feature space.

Exam trap

CompTIA often tests the distinction between preprocessing steps (like lowercasing, tokenization, stop word removal) and feature engineering techniques (like one-hot encoding), leading candidates to mistakenly include one-hot encoding as a preprocessing step when it is actually a vectorization method applied after preprocessing.

42
Multi-Selecthard

A team is using k-fold cross-validation to evaluate a model. They observe high variance in performance scores across folds. Which TWO actions are most likely to reduce this variance? (Choose TWO.)

Select 2 answers
A.Increase the number of folds
B.Use stratified cross-validation
C.Decrease the number of folds
D.Shuffle data before splitting
E.Use a more complex model
AnswersA, B

More folds mean each training set is larger and more similar to the full dataset, reducing variance.

Why this answer

Increasing the number of folds (e.g., from 5 to 10) means each fold contains more training data, which reduces the variance of the performance estimate because the model is trained on a larger portion of the dataset each time. Stratified cross-validation ensures that each fold maintains the same class distribution as the original dataset, which stabilizes performance scores when the dataset is imbalanced, thereby reducing variance across folds.

Exam trap

The AI0-001 exam often tests the misconception that decreasing the number of folds reduces variance, when in fact the opposite is true—fewer folds increase variance because each training set is smaller and more dissimilar.

43
MCQmedium

A financial services company has a real-time fraud detection system that uses Apache Kafka to stream transaction events, a TensorFlow Serving model for scoring, and a Redis cache for lookup of historical fraud patterns. The system processes 10,000 transactions per second with an SLA of 100ms latency per transaction. Recently, after a model update, the latency for some transactions spiked to over 500ms, causing timeouts. The model uses a deep neural network with 10 million parameters. The engineering team suspects the issue is due to increased model inference time. Which action should be taken to reduce latency without significant loss in accuracy?

A.Add more Redis nodes to the cache cluster
B.Increase the number of Kafka partitions and consumer threads
C.Decrease the inference batch size from 32 to 1
D.Quantize the model weights from FP32 to FP16
AnswerD

FP16 quantization reduces model size and speeds up inference, typically with minimal accuracy impact.

Why this answer

The latency spike is caused by increased model inference time after a model update. Quantizing model weights from FP32 to FP16 reduces memory bandwidth and computation requirements, directly speeding up inference on compatible hardware (e.g., GPUs with Tensor Cores) with minimal accuracy loss. This addresses the root cause—model inference latency—without changing the system architecture.

Exam trap

The trap here is that candidates confuse system-level scaling (adding cache nodes or Kafka partitions) with model-level optimization, failing to recognize that the latency spike originates from the model inference step itself.

How to eliminate wrong answers

Option A is wrong because adding Redis nodes improves cache lookup throughput, but the latency spike is due to model inference time, not cache performance. Option B is wrong because increasing Kafka partitions and consumer threads improves message ingestion parallelism, but does not reduce the per-transaction inference latency of the TensorFlow Serving model. Option C is wrong because decreasing the inference batch size from 32 to 1 reduces throughput and increases per-transaction overhead (e.g., kernel launch latency), which would worsen latency, not improve it.

44
MCQhard

An AI model is deployed to a mobile app with limited computational resources. The model is a deep neural network with high latency. Which technique is best to reduce inference time?

A.Increase batch size
B.Add more layers
C.Use a larger model
D.Quantization
AnswerD

Quantization reduces model size and speeds up inference by using lower-precision arithmetic.

Why this answer

Quantization reduces the precision of the model's weights and activations (e.g., from 32-bit floating point to 8-bit integer), which decreases memory footprint and speeds up computation on resource-constrained devices like mobile phones. This directly lowers inference latency without requiring additional hardware or architectural changes.

Exam trap

The AI0-001 exam often tests the misconception that increasing batch size or model size improves performance on edge devices, when in fact these techniques increase resource demands and latency in low-resource environments.

How to eliminate wrong answers

Option A is wrong because increasing batch size improves throughput (samples per second) but does not reduce per-sample latency; it actually increases memory usage and can worsen latency on mobile devices with limited resources. Option B is wrong because adding more layers increases the model depth, which increases computational complexity and latency, making inference slower. Option C is wrong because using a larger model (more parameters) increases both memory and compute requirements, directly increasing inference time on constrained devices.

45
MCQmedium

A healthcare startup is developing a deep learning model to detect diabetic retinopathy from retinal images. The model is trained on a dataset of 10,000 labeled images. During initial testing, the model achieves 99% accuracy on the training set but only 85% on the test set. The startup wants to deploy the model in a clinical setting where false negatives (missing a disease) are critical. The team has access to additional unlabeled retinal images from multiple sources. Which strategy should the team use to improve the model's generalization and reduce false negatives?

A.Use semi-supervised learning with the unlabeled images to improve feature representations
B.Apply aggressive data augmentation to the training set
C.Increase the learning rate during training
D.Add more convolutional layers to the model
AnswerA

Semi-supervised learning utilizes unlabeled data to learn generalizable features, reducing overfitting and improving test performance.

Why this answer

Semi-supervised learning leverages the large pool of unlabeled retinal images to learn robust feature representations, which helps the model generalize better to unseen data. By reducing overfitting (the gap between 99% training and 85% test accuracy), this approach directly improves test-set performance. Additionally, semi-supervised methods can be tuned to emphasize recall, thereby reducing false negatives critical in clinical diabetic retinopathy screening.

Exam trap

CompTIA often tests the misconception that simply increasing data or model complexity (augmentation, layers) always improves generalization, when in fact semi-supervised learning is the targeted solution for leveraging unlabeled data to close the train-test accuracy gap and address class-specific metrics like false negatives.

How to eliminate wrong answers

Option B is wrong because aggressive data augmentation, while helpful for generalization, does not directly address the high false-negative rate; it may even distort critical pathological features if applied too aggressively. Option C is wrong because increasing the learning rate typically destabilizes training, leading to divergence or poor convergence, and does not reduce false negatives or improve generalization. Option D is wrong because adding more convolutional layers increases model capacity, which would likely worsen overfitting given the already large gap between training and test accuracy, and does not specifically target false negatives.

46
Multi-Selecteasy

A data scientist is preparing a dataset for a classification model. The dataset contains several categorical variables with high cardinality. Which TWO encoding methods are appropriate for converting these categorical variables into numerical features?

Select 2 answers
A.Min-max scaling
B.K-means clustering
C.One-hot encoding
D.Principal component analysis (PCA)
E.Label encoding
AnswersC, E

One-hot encoding converts each category into a binary vector, suitable for categorical variables.

Why this answer

One-hot encoding is appropriate for high-cardinality categorical variables because it creates binary columns for each category, allowing the model to treat each category as an independent feature without imposing an ordinal relationship. This is crucial for classification models that assume numerical inputs, as it prevents the model from misinterpreting arbitrary integer labels as having meaningful order or magnitude.

Exam trap

Candidates may incorrectly discard label encoding (option E) because they assume it always imposes an ordinal relationship, but in many classification contexts (e.g., tree-based models) label encoding can handle high-cardinality nominal variables without issue. The trap is to overgeneralize the rule against label encoding, even when the question lists it as a correct answer alongside one-hot encoding.

47
MCQeasy

Refer to the exhibit. What is the recall of the model?

A.0.72
B.0.8
C.0.7
D.0.73
AnswerB

TP=80, FN=20, recall=80/100=0.8

Why this answer

Recall is calculated as True Positives divided by (True Positives + False Negatives). From the confusion matrix, True Positives = 80 and False Negatives = 20, so recall = 80 / (80 + 20) = 80 / 100 = 0.8. This measures the model's ability to correctly identify all actual positive cases.

Exam trap

CompTIA often tests recall by providing a confusion matrix and expects candidates to correctly identify the denominator as TP+FN, not total samples, to avoid confusing recall with accuracy or precision. In this question, the key is correctly reading TP=80 and FN=20 from the exhibit.

How to eliminate wrong answers

Option A (0.72) is wrong because it incorrectly uses True Positives divided by total predictions (72/100 = 0.72), which is accuracy, not recall. Option C (0.7) is wrong because it likely results from misreading the matrix (e.g., using 72/102 or confusing with precision). Option D (0.73) is wrong because it may come from a miscalculation such as (72 + 1)/(72 + 18 + 10) = 73/100, which is not a standard metric.

48
Multi-Selecthard

A data scientist is evaluating a binary classification model for fraud detection. The dataset is highly imbalanced (99% non-fraud, 1% fraud). Which TWO metrics are most appropriate for assessing model performance? (Choose two.)

Select 2 answers
A.Precision
B.Recall
C.F1 score
D.Area under the ROC curve (AUC-ROC)
E.Accuracy
AnswersA, B

Precision measures the proportion of predicted fraud that is actually fraud, important to avoid false positives.

Why this answer

Precision is appropriate because it measures the proportion of predicted fraud cases that are actually fraudulent, which is critical when false positives (flagging legitimate transactions as fraud) are costly. In a highly imbalanced dataset like this (99% non-fraud), precision directly evaluates the model's ability to avoid overwhelming fraud analysts with false alarms.

Exam trap

CompTIA often tests the misconception that AUC-ROC is always the best metric for imbalanced datasets, but the trap here is that AUC-ROC can be misleadingly high even when the model performs poorly on the minority class, whereas precision and recall directly address the class imbalance.

49
MCQeasy

A dataset used for training a classification model contains 10% missing values in a feature that is known to be important. The data scientist decides to impute the missing values. Which imputation method is most robust if the data is not missing completely at random?

A.Delete all rows with missing values
B.Use multiple imputation to model missing values
C.Replace missing values with the mean of the feature
D.Fill missing values with 0
AnswerB

Multiple imputation provides unbiased estimates under missing at random assumption.

Why this answer

Multiple imputation is the most robust method when data is not missing completely at random (NMAR) because it uses a statistical model to account for the relationships between the missing feature and other observed features, generating multiple plausible values and combining them to produce unbiased estimates and valid standard errors. This approach preserves the variability and structure of the data, unlike simpler methods that can introduce bias when missingness depends on unobserved data.

Exam trap

The AI0-001 exam often tests the misconception that mean imputation is a safe default for missing data, but the trap here is that mean imputation assumes data is missing completely at random (MCAR), which is rarely true in real-world datasets, and it fails to account for the underlying missing data mechanism.

How to eliminate wrong answers

Option A is wrong because deleting rows with missing values reduces sample size and can introduce selection bias, especially when data is not missing completely at random (NMAR), leading to loss of statistical power and potentially skewed model performance. Option C is wrong because replacing missing values with the mean of the feature ignores the correlation with other features and reduces variance, which can distort the distribution and bias the model when missingness is not random. Option D is wrong because filling missing values with 0 is arbitrary and assumes the missing value is zero, which is rarely valid for continuous features and can severely distort the feature's distribution and model coefficients.

50
MCQhard

A model trained on a dataset with imbalanced classes achieves 98% accuracy but only 50% recall for the minority class. Which technique should be applied first to address the imbalance?

A.Apply cost-sensitive learning
B.Reduce the majority class size
C.Use SMOTE to generate synthetic samples
D.Collect more data for the minority class
AnswerA

Cost-sensitive learning adjusts class weights in the loss function, directly tackling imbalance without data modification.

Why this answer

Cost-sensitive learning directly modifies the model's loss function to penalize misclassifications of the minority class more heavily than those of the majority class. This approach addresses the root cause of the imbalance—the model's bias toward the majority class—without altering the dataset distribution, making it the most immediate and effective first step.

Exam trap

CompTIA often tests the misconception that data-level techniques like SMOTE or undersampling should always be the first approach, when in fact cost-sensitive learning is a simpler, less invasive, and often more effective initial step that directly adjusts the model's learning objective.

How to eliminate wrong answers

Option B is wrong because reducing the majority class size (random undersampling) discards potentially valuable data, which can lead to loss of information and increased variance in the model, and it is not typically the first technique applied. Option C is wrong because SMOTE generates synthetic samples for the minority class, which can introduce noise and is a data-level augmentation technique that should be considered after cost-sensitive adjustments or as a complementary method, not as the first step. Option D is wrong because collecting more data for the minority class is often impractical, time-consuming, and may not be feasible in real-world scenarios; it is not a guaranteed or immediate solution to the imbalance.

51
MCQeasy

A model's training accuracy is 99% but validation accuracy drops to 60%. What is the most likely issue?

A.Data leakage
B.Overfitting
C.Multicollinearity
D.Underfitting
AnswerB

Overfitting leads to high training accuracy but low validation accuracy.

Why this answer

A training accuracy of 99% with a validation accuracy of only 60% is a classic symptom of overfitting. The model has memorized the training data, including noise and outliers, rather than learning generalizable patterns, causing it to perform poorly on unseen validation data.

Exam trap

CompTIA often tests the distinction between overfitting and data leakage by presenting a large accuracy gap, where candidates might mistakenly attribute the issue to data leakage instead of recognizing that leakage typically inflates both accuracies rather than creating a divergence.

How to eliminate wrong answers

Option A is wrong because data leakage typically causes both training and validation accuracy to be artificially high, not a large gap between them; it occurs when information from outside the training set inadvertently influences the model. Option C is wrong because multicollinearity refers to high correlation among input features in regression models, which affects coefficient stability and interpretability, not a drastic accuracy drop between training and validation sets. Option D is wrong because underfitting would result in low accuracy on both training and validation sets (e.g., both below 70%), not a high training accuracy with a low validation accuracy.

52
MCQmedium

A data engineer is reviewing an S3 bucket policy for a machine learning project. The policy is intended to allow access to training data only from the corporate network (10.0.0.0/16). However, users in the corporate network report access denied. Which issue is most likely causing the problem?

A.The policy is missing a Deny statement.
B.The resource ARN is incorrect.
C.The policy does not include s3:ListBucket action, which is needed to list objects.
D.The IP address condition is not matching because the corporate network uses a different CIDR.
AnswerC

Users need ListBucket to see objects before getting them.

Why this answer

The condition key uses "aws:SourceIp" but the correct key for IP address condition is "aws:SourceIp". However, the exhibit shows "aws:SourceIp" which is correct? Wait, the exhibit shows "aws:SourceIp" — that is correct. But the problem might be that the policy uses "GetObject" but the users might be trying to list objects (s3:ListBucket).

Option C says the action does not include s3:ListBucket, which is often needed first. Option A is wrong because the resource is correct. Option B is wrong because the policy allows access from 10.0.0.0/16.

Option D is wrong because the effect is Allow.

53
MCQeasy

A data engineer needs to store training data in a format that supports columnar pruning during model training. Which storage format should they use?

A.Parquet
B.XML
C.JSON
D.CSV
AnswerA

Parquet is columnar, enabling compression and pruning, reducing I/O.

Why this answer

Parquet is the correct choice because it is a columnar storage format that enables column pruning, allowing the training process to read only the columns needed for model training rather than entire rows. This reduces I/O and speeds up data loading, which is critical for large-scale AI/ML workloads. Unlike row-oriented formats, Parquet stores data by columns, making it efficient for analytical queries and feature selection.

Exam trap

CompTIA often tests the misconception that JSON or CSV are acceptable for columnar pruning because they are common and human-readable, but the trap here is that only columnar formats like Parquet or ORC support efficient column-level access, while row-oriented formats require full record scans.

How to eliminate wrong answers

Option B (XML) is wrong because XML is a verbose, hierarchical text format that stores data row-wise and lacks columnar pruning capabilities, leading to high storage overhead and slow read performance for tabular data. Option C (JSON) is wrong because JSON is a row-oriented, self-describing format that requires parsing entire records even when only a subset of fields is needed, making it unsuitable for column pruning. Option D (CSV) is wrong because CSV is a flat, row-oriented text format that forces reading entire rows into memory, with no support for columnar storage or predicate pushdown, resulting in inefficient I/O for selective column access.

54
MCQhard

A retail company uses a machine learning model to predict daily sales. The model takes features like past sales, promotions, holidays, and weather data. Recently, the model's accuracy dropped significantly. The data engineer checks the data pipeline and finds that the weather data source changed from a free API to a new paid API that provides more detailed data. The new data includes additional attributes like humidity and wind speed, but the existing pipeline only ingests temperature and precipitation. Also, the time zone format changed from UTC to local time. The model was trained on the old format. Which action should the engineer take first to restore model performance?

A.Add a new step to merge old and new weather data before feeding to the model.
B.Transform the new data to match the old format (time zone and selected features) and retrain the model.
C.Revert to the old weather API.
D.Retrain the model with the new data including all new features.
AnswerB

This aligns the data with the training pipeline, resolving the immediate mismatch.

Why this answer

The immediate problem is the time zone change causing misalignment between training and inference data. Transforming the new data to match the old format ensures consistency. Retraining with all new features may introduce drift; reverting may not be possible; merging data without alignment causes inconsistency.

55
Multi-Selecthard

Which THREE data quality dimensions are critical for ensuring model reliability?

Select 3 answers
A.Timeliness.
B.Consistency.
C.Completeness.
D.Volume.
E.Accuracy.
AnswersA, B, E

Outdated data can cause predictions to be irrelevant.

Why this answer

Timeliness is critical because stale data can lead to incorrect model predictions, especially in dynamic environments like network traffic analysis or fraud detection. For AI models, data must reflect the current state of the system to ensure relevance and reliability. Without timely data, the model may act on outdated patterns, reducing its effectiveness.

Exam trap

CompTIA often tests the distinction between data quality dimensions and data characteristics, so the trap here is that candidates confuse completeness or volume with the three critical dimensions (timeliness, consistency, accuracy) that directly impact model reliability.

56
MCQeasy

A data scientist is preparing a dataset for a supervised learning model. The dataset contains missing values in 15% of the rows for a numeric feature. Which preprocessing technique should be applied to minimize bias?

A.Remove all rows with missing values.
B.Impute missing values with the mean of the feature.
C.Encode the missing values as a separate category.
D.Use a model that handles missing values natively.
AnswerB

Mean imputation preserves the dataset size and is appropriate for numeric features when missingness is random.

Why this answer

Imputing missing values with the mean of the feature is the correct approach because it preserves the overall distribution of the numeric feature and avoids introducing systematic bias when only 15% of rows are affected. Removing rows would reduce sample size and potentially introduce selection bias, while encoding missing values as a separate category is inappropriate for numeric features in regression or classification tasks. Mean imputation is a standard, low-bias technique for MCAR (Missing Completely At Random) data in supervised learning pipelines.

Exam trap

CompTIA often tests the misconception that removing rows with missing values is always safe, but the trap here is that candidates overlook how even 15% missingness can bias the model if the missingness is not random, making imputation a more robust preprocessing step.

How to eliminate wrong answers

Option A is wrong because removing rows with missing values reduces the dataset size and can introduce selection bias if the missingness is not completely random (MCAR), leading to a non-representative training set. Option C is wrong because encoding missing values as a separate category is designed for categorical features, not numeric features; for numeric features, this would create an artificial ordinal relationship or require one-hot encoding that distorts the feature's numerical meaning. Option D is wrong because relying on a model that handles missing values natively (e.g., tree-based models) is not a preprocessing technique; it shifts the burden to the algorithm, which may still produce biased splits or require additional assumptions about missingness patterns.

57
MCQeasy

A data scientist is preparing a dataset for a classification model. The dataset contains a column "Age" with 10% missing values and a column "Income" with 30% missing values. Which imputation strategy is MOST appropriate to minimize bias?

A.Replace missing Age with the mean and missing Income with the median.
B.Delete all rows with missing values.
C.Replace missing Age with the mode and missing Income with a constant value.
D.Replace missing values with zeros.
AnswerA

Mean for symmetric Age, median for skewed Income minimizes bias.

Why this answer

Using mean imputation for Age (10% missing) and median imputation for Income (30% missing) minimizes bias. Mean is suitable for roughly symmetric distributions with low missingness, while median is robust to outliers and skewness, which is common in income data. This combination reduces distortion of central tendency and preserves data integrity better than uniform methods.

Exam trap

CompTIA often tests the misconception that a single imputation method (e.g., mean for all columns) is universally appropriate, when in fact the choice must consider the missingness rate and the distribution of each feature to minimize bias.

How to eliminate wrong answers

Option B is wrong because deleting all rows with missing values (listwise deletion) reduces sample size and can introduce selection bias, especially when missingness is not completely at random (MCAR). Option C is wrong because replacing Age with the mode is inappropriate for continuous variables like age, as it discards variance and can create artificial clusters; replacing Income with a constant value (e.g., 0) introduces systematic bias and distorts the distribution. Option D is wrong because replacing missing values with zeros for both Age and Income is arbitrary and unrealistic, leading to severe underestimation of central tendency and inflated model error.

58
MCQhard

A large e-commerce company uses a recommendation system based on collaborative filtering. The system uses a matrix factorization model that is trained nightly on the entire user-item interaction history. Recently, the company launched a flash sale with thousands of new products. Users are reporting that the recommendations are not showing the new products, even for users who have purchased them during the sale. The data engineering team notices that the new products have very few interactions in the training data. The model's loss on the validation set has increased, and the recall@10 metric has dropped from 0.45 to 0.32. The team needs to improve the recommendation of new items without retraining the entire model from scratch every hour. Which approach should the team take?

A.Use a hybrid model that combines collaborative filtering with content-based features from product metadata
B.Retrain the model every hour to incorporate new interactions quickly
C.Remove the new products from the recommendation pool until they accumulate enough interactions
D.Increase the number of latent factors in the matrix factorization model
AnswerA

Content-based features allow the model to recommend new items based on their attributes, overcoming the cold-start problem.

Why this answer

A hybrid model that combines collaborative filtering with content-based features (e.g., product metadata like category, price, or description) can recommend new products even with zero or very few user interactions. The content-based component leverages item attributes to compute similarity between new and existing items, enabling the system to surface new products without requiring extensive interaction history. This approach addresses the cold-start problem for new items while preserving the collaborative filtering signal for established items, and it does not require retraining the entire model from scratch every hour.

Exam trap

CompTIA often tests the misconception that simply retraining more frequently or increasing model complexity (e.g., more latent factors) can solve the cold-start problem, but the core issue is the lack of interaction data for new items, which requires a content-based or hybrid approach to leverage item metadata.

How to eliminate wrong answers

Option B is wrong because retraining the model every hour would be computationally expensive and operationally impractical for a large-scale system with thousands of new products; it also does not solve the fundamental cold-start issue since new items still have very few interactions in each hourly training window. Option C is wrong because removing new products from the recommendation pool defeats the business purpose of the flash sale, which is to promote and surface new items to users, and it would lead to a poor user experience and lost revenue. Option D is wrong because increasing the number of latent factors in matrix factorization does not address the lack of interaction data for new items; it may even exacerbate overfitting to sparse data and increase computational cost without improving cold-start recommendations.

59
MCQhard

An organization needs to store sensitive customer data for training a machine learning model. The data must be encrypted at rest and in transit, and access must be audited. Which combination of practices should be implemented?

A.Use TLS for transfer, AES-256 for storage, and AWS CloudTrail for auditing
B.Use FTP for transfer, AES-128 for storage, and manual log review
C.Use SSH for transfer, store data in a database, and enable access logs
D.Use MD5 for hashing, store data in plaintext, and enable server logs
AnswerA

These provide encryption and auditing.

Why this answer

It combines TLS (Transport Layer Security) for encrypting data in transit, AES-256 for strong encryption at rest, and AWS CloudTrail for auditing API-level access. TLS ensures confidentiality and integrity during transmission, AES-256 provides robust symmetric encryption for stored data, and CloudTrail logs all AWS API calls for compliance and audit trails. This triad satisfies the requirements of encryption in transit, at rest, and audited access.

Exam trap

CompTIA often tests the distinction between encryption (AES) and hashing (MD5), and the requirement for both in-transit and at-rest encryption, leading candidates to confuse SSH or FTP with proper TLS-based encryption.

How to eliminate wrong answers

Option B is wrong because FTP transfers data in plaintext, offering no encryption in transit, and AES-128 is weaker than AES-256, while manual log review is not scalable or auditable. Option C is wrong because SSH encrypts only the session, not the data at rest, and storing data in a database without specifying encryption at rest leaves it vulnerable; access logs alone do not provide the same audit trail as a dedicated service like CloudTrail. Option D is wrong because MD5 is a hash function, not encryption, and storing data in plaintext violates the encryption-at-rest requirement; server logs are insufficient for comprehensive auditing.

60
Multi-Selecthard

Which TWO are best practices for versioning machine learning models? (Choose 2)

Select 2 answers
A.Use the same model version for all deployments
B.Tag each model with training date, hyperparameters, and performance metrics
C.Use a version control system (e.g., Git) for model code and configuration
D.Store only the final model binary without metadata
E.Manually rename model files with version numbers
AnswersB, C

Metadata enables comparison and audit.

Why this answer

Tagging each model with training date, hyperparameters, and performance metrics creates a reproducible audit trail. This practice aligns with MLOps principles, enabling teams to trace model behavior back to specific training runs and compare versions objectively.

Exam trap

CompTIA often tests the misconception that versioning is only about file naming or storing the binary, when in fact it requires a comprehensive metadata and code tracking system to ensure reproducibility and traceability.

61
MCQeasy

A data scientist is preparing a dataset for training a classification model. The dataset contains 10,000 records with a binary target variable where 9,500 belong to class A and 500 belong to class B. Which technique should the scientist use to address the class imbalance?

A.SMOTE (Synthetic Minority Oversampling Technique)
B.Random undersampling of class A
C.Adding Gaussian noise to class B
D.Principal Component Analysis (PCA)
AnswerA

SMOTE creates synthetic minority samples to balance classes.

Why this answer

SMOTE is the correct technique because it generates synthetic samples for the minority class (class B) by interpolating between existing minority instances, effectively balancing the dataset without losing information. This approach avoids the overfitting risk of simple oversampling and the information loss of undersampling, making it ideal for a 19:1 imbalance ratio.

Exam trap

CompTIA often tests the misconception that any data augmentation (like adding noise) or dimensionality reduction (like PCA) can solve class imbalance, when in fact only resampling techniques like SMOTE directly address the skewed distribution of the target variable.

How to eliminate wrong answers

Option B is wrong because random undersampling of class A discards 9,000 majority class records, leading to significant information loss and potential bias in the model. Option C is wrong because adding Gaussian noise to class B does not create meaningful synthetic samples; it merely corrupts existing minority data, which can reduce model performance and introduce unrealistic variance. Option D is wrong because PCA is a dimensionality reduction technique used for feature extraction or noise reduction, not for addressing class imbalance in the target variable.

62
Multi-Selectmedium

A computer vision team is building an image classifier for rare wildlife species. The dataset has only 500 images per class, and the model overfits. Which THREE data augmentation techniques are most likely to reduce overfitting? (Choose three.)

Select 3 answers
A.Horizontal flip
B.Adding Gaussian noise
C.Random cropping
D.Color jitter (brightness, contrast, saturation)
E.Random rotation by ±10 degrees
AnswersA, D, E

Flipping is a standard augmentation that doubles the dataset size.

Why this answer

Horizontal flip is a simple and effective data augmentation technique that doubles the training data by mirroring images, which helps the model generalize better to variations in orientation. This is particularly useful for wildlife images where the animal may appear facing left or right, reducing overfitting by exposing the model to more diverse examples without collecting new data.

Exam trap

CompTIA often tests the distinction between augmentations that preserve class labels (like flips and rotations) versus those that may alter semantic content (like extreme cropping or noise), leading candidates to overestimate the effectiveness of Gaussian noise for overfitting reduction.

63
MCQmedium

A logistics company uses a machine learning model to predict delivery times based on historical data including distance, traffic, weather, and driver performance. The model is deployed as a REST API using Flask and run on a single server. Recently, the model has been returning predictions with high latency (over 2 seconds) during peak hours when the API receives 500 requests per second. The server has 8 CPU cores and 32 GB RAM. The model is a gradient boosting model (XGBoost) with 500 trees. The engineer wants to reduce inference latency to under 500ms without retraining the model. Which action is most effective?

A.Prune the model by reducing the number of trees to 100 and limit tree depth
B.Replace XGBoost with a linear regression model
C.Scale horizontally by deploying additional servers behind a load balancer
D.Increase server RAM to 128 GB
AnswerA

Pruning reduces computational load and latency while often maintaining adequate accuracy.

Why this answer

Pruning the model by reducing the number of trees (e.g., from 500 to 100) directly reduces the number of decision paths evaluated during inference, which decreases latency. This does not require retraining; pruning can be applied post-training. Option B (linear regression) would require retraining and likely lose accuracy.

Option C (horizontal scaling) improves throughput but does not reduce per-request latency; it may help if the server is overloaded, but pruning is more effective for latency. Option D (increasing RAM) does not address the CPU-bound tree traversal bottleneck.

64
MCQmedium

Refer to the exhibit. A data scientist reviews the pipeline and notes that the model performance degraded. Which change to the pipeline would most likely improve model performance?

A.Change the impute strategy from mean to median for the 'income' column.
B.Remove the normalization step entirely.
C.Drop the 'product_category' column instead of one-hot encoding.
D.Change the encoding method from onehot to label encoding.
AnswerA

Income often has outliers; median is less affected by extremes.

Why this answer

The 'income' column likely contains outliers that skew the mean, making mean imputation sensitive to extreme values. Using median imputation is more robust to outliers, preserving the central tendency of the data and reducing bias introduced during preprocessing. This directly addresses the model performance degradation caused by distorted feature distributions.

Exam trap

The AI0-001 exam often tests the candidate's understanding that mean imputation is not always optimal, especially when outliers are present, and that median imputation is a simple yet effective robust alternative.

How to eliminate wrong answers

Option B is wrong because removing normalization entirely would likely worsen performance, as many models (e.g., neural networks, SVMs) assume features are on a similar scale; without normalization, features with larger magnitudes dominate the loss function. Option C is wrong because dropping 'product_category' loses categorical information that one-hot encoding preserves, and the degradation is more likely due to imputation issues than encoding method. Option D is wrong because label encoding imposes an ordinal relationship on nominal categories, which can mislead models into assuming false orderings, often degrading performance more than one-hot encoding.

65
MCQeasy

A data engineer discovers that a dataset contains duplicate rows. Which data cleaning step is MOST appropriate?

A.Keep only the first occurrence.
B.Fill duplicates with the mean.
C.Remove duplicate rows.
D.Convert duplicates to categorical.
AnswerC

Removing duplicates ensures each observation is unique.

Why this answer

Removing duplicate rows is the most appropriate data cleaning step because duplicate rows can bias statistical analyses and machine learning models by overrepresenting certain observations. In data engineering, deduplication is a standard preprocessing step to ensure data integrity and avoid skewed results. Option C directly addresses this by eliminating redundant entries without introducing artificial values or altering the data distribution.

Exam trap

CompTIA often tests the misconception that 'keeping the first occurrence' is a valid deduplication strategy, but in data engineering, this is arbitrary and can lead to data loss or bias, whereas explicit removal is the standard practice.

How to eliminate wrong answers

Option A is wrong because keeping only the first occurrence arbitrarily discards potentially valid later occurrences without considering context, which can introduce bias if duplicates are not truly identical. Option B is wrong because filling duplicates with the mean is nonsensical—duplicates are entire rows, not missing values, and imputing a mean would corrupt the dataset by replacing valid data with an aggregate. Option D is wrong because converting duplicates to categorical does not resolve the issue of overrepresentation; it merely relabels the problem without removing the redundant rows.

66
MCQeasy

An e-commerce company deploys a model to recommend products to users. The recommendation system uses collaborative filtering based on user-item interaction history. After deployment, the model shows decreasing click-through rates (CTR) over time. The data engineer notices that the model was trained on data from the past six months and is retrained daily. However, the trend suggests that user preferences are shifting more rapidly than expected. The engineer suspects that the model is suffering from distribution drift. Which approach should the engineer implement to adapt the model more quickly to changing user behavior?

A.Increase the retraining period to once per week to reduce computational cost
B.Switch to an online learning algorithm that updates the model after each user click
C.Increase the model complexity by adding more features and layers
D.Use only the last week of data for training to focus on recent trends
AnswerB

Online learning continuously adapts to new data, capturing shifts in user preferences promptly.

Why this answer

Online learning algorithms update the model incrementally with each new user click, allowing it to rapidly adapt to shifting user preferences. This directly addresses distribution drift caused by fast-changing behaviors. Option A is wrong because increasing retraining to once per week reduces update frequency, making the model slower to adapt.

Option C is wrong because adding complexity does not solve distribution drift and risks overfitting. Option D is wrong because training on only the last week may produce a noisy model and does not provide a mechanism for continuous adaptation.

67
Multi-Selectmedium

Which TWO techniques are commonly used for feature selection in machine learning? (Choose 2)

Select 2 answers
A.Principal Component Analysis (PCA)
B.SMOTE
C.L1 regularization (Lasso)
D.Dropout
E.Recursive Feature Elimination (RFE)
AnswersC, E

Lasso can zero out coefficients.

Why this answer

L1 regularization (Lasso) is correct because it adds a penalty equal to the absolute value of the magnitude of coefficients, which can shrink some coefficients exactly to zero, effectively performing feature selection by removing irrelevant features from the model. This makes it a built-in feature selection technique within the training process.

Exam trap

CompTIA often tests the distinction between dimensionality reduction (PCA) and feature selection, where candidates mistakenly think PCA selects original features rather than creating new ones.

68
MCQhard

A deep learning model for image classification achieves 99% training accuracy but only 85% validation accuracy. The model has millions of parameters. Which technique is most likely to reduce overfitting while maintaining high accuracy?

A.Reduce batch size from 32 to 8
B.Decrease the learning rate by a factor of 10
C.Add dropout layers with a rate of 0.5 after each convolutional block
D.Increase the number of training epochs to 500
AnswerC

Dropout is a standard regularization technique for deep networks.

Why this answer

Dropout is a regularization technique that randomly drops a fraction of neurons during training, which prevents co-adaptation of features and forces the network to learn more robust representations. With 99% training accuracy and 85% validation accuracy, the model is clearly overfitting, and adding dropout layers with a rate of 0.5 after each convolutional block directly addresses this by reducing the model's capacity to memorize the training data, while still allowing high accuracy on the validation set.

Exam trap

The AI0-001 exam often tests the misconception that reducing learning rate or batch size is a primary method to combat overfitting, when in fact these are optimization adjustments, not regularization techniques designed to reduce model capacity.

How to eliminate wrong answers

Option A is wrong because reducing batch size from 32 to 8 increases gradient noise and can actually lead to slower convergence or instability, but it does not directly regularize the model to combat overfitting; it may even worsen generalization in some cases. Option B is wrong because decreasing the learning rate by a factor of 10 helps with convergence and fine-tuning but does not address the root cause of overfitting—it only changes the step size, not the model's capacity to memorize. Option D is wrong because increasing the number of training epochs to 500 will only exacerbate overfitting, as the model will have more iterations to fit the training data noise, likely driving validation accuracy even lower.

69
MCQmedium

A real-time recommendation system requires low latency. Which data storage strategy is best for serving user profiles and item embeddings?

A.Time-series database (e.g., InfluxDB)
B.In-memory key-value store (e.g., Redis)
C.Relational database with joins
D.Data lake in object storage (e.g., Amazon S3)
AnswerB

In-memory key-value stores offer sub-millisecond reads, suitable for real-time serving.

Why this answer

An in-memory key-value store like Redis is ideal for serving user profiles and item embeddings in a real-time recommendation system because it provides sub-millisecond read/write latency by keeping data in RAM. This directly meets the low-latency requirement for fetching embeddings and profiles on each request, without the overhead of disk I/O or complex query processing.

Exam trap

CompTIA often tests the misconception that any database with 'fast' in its name (like InfluxDB) is suitable for real-time serving, but the trap is that time-series databases prioritize write throughput and range queries over low-latency point lookups, which is the actual requirement here.

How to eliminate wrong answers

Option A is wrong because time-series databases like InfluxDB are optimized for timestamped metrics (e.g., CPU usage, sensor data) and not for low-latency key-based lookups of user profiles or embeddings; they introduce unnecessary indexing and query overhead. Option C is wrong because relational databases with joins require disk-based storage and SQL parsing, which adds significant latency (often tens to hundreds of milliseconds) compared to in-memory key-value access, making them unsuitable for real-time serving. Option D is wrong because a data lake in object storage like Amazon S3 has high latency (typically 100-200 ms per request) due to HTTP-based API calls and is designed for batch analytics, not for serving individual records in real-time.

70
MCQeasy

An engineer is building a regression model to predict housing prices. The dataset includes features such as square footage, number of bedrooms, and year built. The engineer notices that the square footage values range from 500 to 10,000, while the number of bedrooms ranges from 1 to 5. Which preprocessing step is most critical before training a gradient descent-based model?

A.Use k-fold cross-validation
B.Apply log transformation to all features
C.Normalize or standardize the features
D.One-hot encode the features
AnswerC

Scaling improves convergence of gradient descent.

Why this answer

Gradient descent-based models are sensitive to the scale of input features because they update weights proportionally to the gradient, which is influenced by feature magnitudes. With square footage ranging 500–10,000 and bedrooms 1–5, the larger feature will dominate the gradient, causing slow or unstable convergence. Normalizing or standardizing (e.g., Z-score or min-max scaling) ensures all features contribute equally, leading to faster and more reliable training.

Exam trap

CompTIA often tests the misconception that any data transformation (like log or one-hot encoding) is universally beneficial, but the key is matching the preprocessing step to the model's mathematical requirements—here, gradient descent's sensitivity to scale makes normalization/standardization the critical step.

How to eliminate wrong answers

Option A is wrong because k-fold cross-validation is a model evaluation technique to assess generalization, not a preprocessing step to address feature scale issues. Option B is wrong because log transformation is used to handle skewed distributions or multiplicative relationships, not to rescale features with different ranges; applying it to all features (including integer counts like bedrooms) can distort their meaning and is unnecessary for gradient descent scaling. Option D is wrong because one-hot encoding is used for categorical features to convert them into binary vectors, but the features listed (square footage, bedrooms, year built) are all numerical and do not require encoding.

71
MCQhard

An AI team notices that a model's F1 score on the validation set is 0.95, but on the test set it drops to 0.72. Which course of action is most appropriate?

A.Reduce the training dataset size.
B.Adjust the train/test split to be more representative.
C.Increase model complexity.
D.Apply regularization.
AnswerD

Regularization penalizes large weights or complex structures, reducing overfitting and improving generalization.

Why this answer

The F1 score dropping from 0.95 on the validation set to 0.72 on the test set is a classic sign of overfitting, where the model has memorized the training/validation data but fails to generalize to unseen test data. Applying regularization (e.g., L1/L2 weight decay, dropout) is the most appropriate course of action because it penalizes overly complex models, reduces variance, and improves generalization without requiring more data or changing the model architecture.

Exam trap

CompTIA often tests the distinction between overfitting (high variance) and underfitting (high bias), and the trap here is that candidates may incorrectly choose to increase model complexity (Option C) because they focus on the high validation score rather than recognizing the performance drop as a variance problem.

How to eliminate wrong answers

Option A is wrong because reducing the training dataset size would likely worsen overfitting by providing even less data for the model to learn generalizable patterns, increasing variance. Option B is wrong because adjusting the train/test split to be more representative does not address the underlying overfitting issue; the model's poor test performance is due to high variance, not a biased or unrepresentative split. Option C is wrong because increasing model complexity (e.g., adding more layers or parameters) would exacerbate overfitting, further increasing the gap between validation and test performance.

72
Multi-Selecthard

A data engineer is designing a pipeline for a streaming data application that uses a machine learning model to detect anomalies in real time. Which TWO practices should the engineer implement to ensure data quality and model reliability?

Select 2 answers
A.Use batch processing to transform data in fixed intervals
B.Store all raw data indefinitely for future analysis
C.Use a sliding window for feature computation
D.Implement data validation checks at the ingestion point
E.Retrain the model on a fixed schedule every 24 hours
AnswersC, D

Sliding windows allow the model to use the most recent data for accurate anomaly detection.

Why this answer

Streaming anomaly detection requires real-time feature computation over recent data, and a sliding window ensures that only the most relevant data points are used for model inference, maintaining low latency and adapting to concept drift. This approach avoids the staleness of batch processing and aligns with the continuous nature of streaming pipelines.

Exam trap

CompTIA often tests the misconception that batch processing or fixed retraining schedules are sufficient for real-time streaming applications, when in fact sliding windows and continuous validation are required to maintain low latency and model accuracy.

73
MCQhard

A deep learning model for image classification is overfitting due to a small dataset. The team decides to apply data augmentation. Which augmentation technique is least likely to preserve the label?

A.Adding random noise
B.Random rotation
C.Random cropping and rescaling
D.Horizontal flip
AnswerC

Cropping might remove the object of interest, rendering the label invalid.

Why this answer

Random cropping and rescaling is least likely to preserve the label because it can cut out the primary object or distort its proportions, potentially removing the discriminative features needed for correct classification. For example, cropping a dog image to show only the background or a leg could change the semantic meaning, making the label 'dog' incorrect. In contrast, other techniques like noise, rotation, or flipping typically retain the core subject and its label.

Exam trap

CompTIA often tests the misconception that all augmentations are equally label-preserving, but the trap here is that random cropping can alter the semantic content by removing the object, while other transformations like rotation or flipping maintain the object's presence and identity.

How to eliminate wrong answers

Option A is wrong because adding random noise preserves the label; it introduces pixel-level variations that help generalize without altering the object's identity or spatial layout. Option B is wrong because random rotation preserves the label; rotating an image by small or moderate angles does not change the object class, as CNNs are designed to be rotation-invariant to some degree. Option D is wrong because horizontal flip preserves the label; mirroring an image does not change the object's category (e.g., a cat remains a cat), and it is a standard augmentation for symmetric or non-directional objects.

74
MCQmedium

A machine learning model for credit card fraud detection is deployed. The model's precision is 0.95 and recall is 0.60. The business cost of missing a fraud is very high. Which of the following should the team prioritize to reduce the number of false negatives?

A.Use a different model algorithm.
B.Add more features.
C.Increase the classification threshold.
D.Decrease the classification threshold.
AnswerD

Lower threshold classifies more cases as positive, thus catching more actual frauds (reducing false negatives).

Why this answer

Decreasing the classification threshold makes the model more sensitive, classifying more transactions as fraudulent. This increases recall (reducing false negatives) at the cost of precision. Given the high cost of missing fraud, lowering the threshold is the direct way to capture more true positives, even if it increases false positives.

Exam trap

CompTIA often tests the misconception that improving model accuracy or changing algorithms is the primary fix, when in fact adjusting the decision threshold is the simplest and most effective way to address precision-recall trade-offs for high-cost false negatives.

How to eliminate wrong answers

Option A is wrong because simply switching algorithms does not guarantee a reduction in false negatives; the threshold and cost function matter more. Option B is wrong because adding more features may improve overall model performance but does not directly target the trade-off between precision and recall; it could even increase false negatives if the new features are noisy. Option C is wrong because increasing the classification threshold makes the model more conservative, reducing false positives but increasing false negatives, which is the opposite of what is needed.

75
MCQhard

Refer to the exhibit. A data scientist reviews the MLflow run for a Random Forest model on customer churn data. What is the most likely issue with this model?

A.The model is underfitting because training accuracy is too high.
B.The model is overfitting because there is a large gap between train and validation accuracy.
C.The model is performing well because validation accuracy is above 0.8.
D.The model has a data leak because dataset version is v2.
AnswerB

High train accuracy with lower validation accuracy is classic overfitting.

Why this answer

A large gap between training accuracy (e.g., 0.99) and validation accuracy (e.g., 0.82) indicates that the Random Forest model has memorized the training data but fails to generalize to unseen validation data. This is the classic symptom of overfitting, where the model captures noise rather than the underlying pattern. In MLflow, comparing train and validation metrics directly reveals this discrepancy.

Exam trap

CompTIA often tests the misconception that high validation accuracy alone indicates a good model, ignoring the critical comparison between training and validation metrics to detect overfitting.

How to eliminate wrong answers

Option A is wrong because underfitting is characterized by low training accuracy, not high training accuracy; high training accuracy with poor validation performance indicates overfitting, not underfitting. Option C is wrong because a validation accuracy above 0.8 alone does not guarantee good model performance if there is a significant gap between train and validation accuracy, which signals overfitting. Option D is wrong because dataset version v2 is simply a versioning label and does not inherently cause data leakage; data leakage would involve information from the validation set leaking into training, which is unrelated to the version number.

Page 1 of 2 · 81 questions totalNext →

Ready to test yourself?

Try a timed practice session using only AI Models and Data Engineering questions.