CCNA Modeling Questions

24 of 624 questions · Page 9/9 · Modeling · Answers revealed

601
MCQhard

A company is building a recommendation system using Amazon SageMaker Factorization Machines. The dataset includes user IDs, item IDs, and implicit feedback (clicks). The data is sparse with millions of users and items. The model needs to capture interactions between users and items. Which hyperparameter tuning strategy should be used to improve model performance?

A.Increase L2 regularization to prevent overfitting.
B.Increase the batch size to speed up training.
C.Decrease the learning rate to improve convergence.
D.Change the activation function to ReLU.
E.Increase the number of factors (num_factors) to capture more latent features.
AnswerE

More factors increase model capacity to learn interactions.

Why this answer

Option A is correct because increasing the number of factors allows the model to capture more complex interactions. Option B (learning rate) helps convergence but not specifically interaction complexity. Option C (batch size) affects speed, not capacity.

Option D (regularization) prevents overfitting but does not increase interaction capacity. Option E (activation function) is not relevant for factorization machines (linear model).

602
Multi-Selectmedium

A data scientist is training a deep learning model on SageMaker using a custom container. The training job fails with an 'OutOfMemory' error. Which THREE actions could resolve this issue? (Choose 3.)

Select 3 answers
A.Use gradient accumulation to simulate larger batch sizes.
B.Reduce the number of training epochs.
C.Reduce the batch size.
D.Use an instance type with more memory, such as ml.p3.16xlarge.
E.Increase the learning rate.
AnswersA, C, D

Gradient accumulation allows training with effectively larger batch without memory increase.

Why this answer

OutOfMemory can be resolved by reducing batch size, using gradient accumulation, or using a larger instance. Option A (reducing epochs) does not affect memory usage per batch. Option E (increasing learning rate) might cause instability but not directly memory.

603
MCQhard

Refer to the exhibit. A custom training job using Pipe input mode fails. The logs indicate the algorithm cannot read the data. What is the most likely issue?

A.The algorithm expects File mode but Pipe mode is specified
B.The instance type is too small for the data
C.The training data is compressed
D.The training image is not accessible
AnswerA

Pipe mode sends data via pipe; algorithms expecting files will fail.

Why this answer

Pipe mode streams data from S3, but the algorithm must be designed to read from a pipe (stdin) rather than a file. Many custom algorithms expect files. Option A is wrong because the image path is correct.

Option B is wrong because instance type is not the cause. Option C is wrong because compression is none.

604
MCQmedium

A company wants to use Amazon SageMaker to train a model using a custom algorithm packaged in a Docker container. Which approach should they use?

A.Use SageMaker Ground Truth
B.Use SageMaker Autopilot
C.Use the SageMaker SDK to create an Estimator with the image URI of the custom container
D.Select one of the built-in algorithms in SageMaker
AnswerC

The Estimator can accept a custom Docker image for training.

Why this answer

SageMaker supports bring-your-own-container for custom algorithms. Option B is wrong because SageMaker built-in algorithms are predefined. Option C is wrong because SageMaker Autopilot automates model selection, not custom containers.

Option D is wrong because SageMaker Ground Truth is for labeling.

605
MCQmedium

A company is deploying a fraud detection model using Amazon SageMaker. The model is a linear learner trained on 100 GB of data. For inference, the model receives individual transactions and must return a prediction within 100 ms. Which endpoint configuration should the team use to meet the latency requirement?

A.Use a multi-model endpoint with CPU instances.
B.Deploy a single model endpoint using a GPU instance and enable autoscaling.
C.Use a batch transform job scheduled every minute.
D.Deploy using SageMaker Serverless Inference.
AnswerB

GPU instance can process individual transactions fast, autoscaling handles traffic.

Why this answer

Option B is correct because a single-model endpoint on a GPU instance provides the low-latency, high-throughput inference required for real-time fraud detection. GPU instances accelerate linear learner inference by parallelizing matrix operations, enabling sub-100 ms predictions for individual transactions. Autoscaling ensures the endpoint can handle traffic spikes without degrading latency.

Exam trap

The trap here is that candidates often choose multi-model endpoints (Option A) thinking they reduce cost, but they overlook the cold-start latency penalty for large models, which violates the strict 100 ms requirement.

How to eliminate wrong answers

Option A is wrong because multi-model endpoints share a single container and load models on demand, which adds cold-start latency that can exceed 100 ms for individual transactions, especially with a 100 GB model. Option C is wrong because batch transform jobs are designed for offline, asynchronous processing of large datasets, not real-time inference with a 100 ms latency requirement. Option D is wrong because SageMaker Serverless Inference has a maximum concurrency limit and cold-start latency that can exceed 100 ms, making it unsuitable for sub-100 ms real-time predictions.

606
MCQeasy

A healthcare company needs to predict patient readmission risk using clinical notes. Which AWS service can be used to preprocess the text data into numerical features for a machine learning model?

A.Amazon SageMaker Ground Truth
B.Amazon Comprehend
C.Amazon Translate
D.Amazon Rekognition
AnswerB

Comprehend provides NLP capabilities for text feature extraction.

Why this answer

Amazon Comprehend is a natural language processing (NLP) service that can extract entities, key phrases, and sentiment. It is suitable for preprocessing clinical notes into features. SageMaker Ground Truth is for data labeling.

Rekognition is for images. Translate is for translation.

607
Multi-Selectmedium

Which TWO of the following are valid approaches to handle missing values in a dataset for a machine learning model?

Select 2 answers
A.Use a neural network to predict missing values
B.Impute missing values with the mean of the column
C.Remove rows with missing values
D.Standardize the features to handle missing values
E.Apply one-hot encoding to convert missing values
AnswersB, C

Mean imputation is a standard technique for numerical features.

Why this answer

Removing rows with missing values is a valid approach (listwise deletion). Imputing with the mean is also valid. Using a neural network to predict missing values is possible but not standard.

Standardization does not handle missing values. One-hot encoding is for categorical variables.

608
MCQmedium

A machine learning engineer is using Amazon SageMaker to train a model. The training data is stored in an S3 bucket encrypted with AWS KMS. The SageMaker training job fails with an AccessDenied error when trying to read the data. Which IAM policy addition should resolve the issue?

A.Add kms:Decrypt permission for the KMS key.
B.Add s3:GetObject permission for the bucket.
C.Add kms:GenerateDataKey permission for the key.
D.Attach the AmazonSageMakerFullAccess policy.
AnswerA

Decrypt is required to read encrypted objects.

Why this answer

The correct answer is A because when an S3 bucket is encrypted with AWS KMS, the SageMaker training job's execution role must have the `kms:Decrypt` permission for the specific KMS key to read the encrypted objects. Without this permission, the job fails with an AccessDenied error, even if `s3:GetObject` is granted, because SageMaker must decrypt the data before reading it.

Exam trap

The trap here is that candidates often assume `s3:GetObject` is sufficient for reading encrypted objects, overlooking that KMS-encrypted S3 data requires explicit `kms:Decrypt` permissions on the execution role.

How to eliminate wrong answers

Option B is wrong because `s3:GetObject` alone is insufficient; the error occurs specifically due to KMS encryption, so the missing permission is for KMS decryption, not S3 read access. Option C is wrong because `kms:GenerateDataKey` is used for creating new data keys for encryption, not for decrypting existing objects; the required permission for reading encrypted data is `kms:Decrypt`. Option D is wrong because attaching the `AmazonSageMakerFullAccess` managed policy does not automatically grant permissions for customer-managed KMS keys; it only provides basic SageMaker permissions, and explicit KMS key permissions must be added to the role.

609
MCQmedium

A data scientist is training a binary classifier on an imbalanced dataset where the positive class represents 1% of the data. The model currently achieves 99% accuracy but a recall of only 10% on the positive class. Which metric combination should the data scientist prioritize to evaluate model improvements?

A.F1 score and AUC-ROC
B.Precision and recall at 90% precision
C.Accuracy and RMSE
D.Precision and RMSE
AnswerA

F1 score balances precision and recall; AUC-ROC is robust to imbalance.

Why this answer

With a highly imbalanced dataset (1% positive class), 99% accuracy is misleading because the model can achieve it by simply predicting the majority class. The low recall (10%) indicates the model fails to identify most positive instances. The F1 score balances precision and recall, providing a single metric for minority class performance, while AUC-ROC evaluates the model's ability to distinguish between classes across all thresholds, making it robust to class imbalance.

Exam trap

The trap here is that candidates see 99% accuracy and assume the model is good, failing to recognize that accuracy is a poor metric for imbalanced datasets, and that metrics like RMSE are for regression, not classification.

How to eliminate wrong answers

Option B is wrong because 'precision and recall at 90% precision' is not a standard metric combination; it fixes precision arbitrarily, which may not be achievable or relevant for evaluating overall model improvements, and it ignores the trade-off with recall. Option C is wrong because accuracy is misleading on imbalanced data (as shown) and RMSE is a regression metric, not suitable for binary classification evaluation. Option D is wrong because RMSE is inappropriate for classification tasks; it measures continuous error, not classification performance, and precision alone does not capture recall or threshold behavior.

610
MCQmedium

A data scientist has this IAM policy attached to their role. When trying to create a SageMaker endpoint using the AWS CLI, they get an 'AccessDenied' error. What is the most likely reason?

A.The role does not have permission to use KMS to decrypt the model artifacts
B.The policy does not include 'sagemaker:InvokeEndpoint' action
C.The role does not have permission to access the S3 bucket containing the model artifacts
D.The policy uses a wildcard '*' for resources instead of specific ARNs
AnswerB

Creating an endpoint may require additional actions like DescribeEndpoint; InvokeEndpoint is needed for real-time inference.

Why this answer

Option B is correct because the policy only allows creating the endpoint (CreateEndpoint), but not invoking it (InvokeEndpoint). The error may be due to missing permissions for other actions like sagemaker:DescribeEndpoint. Option A (S3) is not shown.

Option C (KMS) not shown. Option D (missing resources) is possible but policy uses *.

611
MCQmedium

Refer to the exhibit. A data scientist creates a SageMaker model using the configuration above. When deploying the model to an endpoint, the endpoint status remains 'Creating' for a long time and then fails. What is the most likely cause?

A.The S3 model artifact does not exist
B.The environment variable SAGEMAKER_REGION is incorrect
C.The model name is already in use
D.The IAM role lacks permission to pull the Docker image from ECR
AnswerD

The image is in a different account; the role needs ecr:GetDownloadUrlForLayer and BatchGetImage permissions.

Why this answer

The image URI points to an ECR repository in account 382416733822, which is not the customer's account. SageMaker expects the image to be in the same account or accessible via cross-account permissions. This URI is likely the AWS account for built-in algorithms, but if the region or repository is incorrect, it may fail.

The most likely issue is that the image does not exist in that account or the role lacks permissions to pull it.

612
MCQeasy

A data scientist needs to implement a recommendation system for an e-commerce website. Which Amazon service is specifically designed for building and deploying recommendation models?

A.Amazon SageMaker
B.Amazon Rekognition
C.Amazon Forecast
D.Amazon Personalize
AnswerD

Personalize is specifically for building and deploying recommendation models.

Why this answer

Amazon Personalize is a fully managed machine learning service that provides real-time personalized recommendations. It is purpose-built for recommendation systems. SageMaker is a general-purpose ML platform, but Personalize is specialized for recommendations.

613
MCQmedium

A data scientist is using Amazon SageMaker to train a linear regression model. The training data has 10 features and 100,000 observations. The model's training loss is decreasing, but the validation loss starts increasing after a few epochs. Which step should the data scientist take first to address this issue?

A.Add more features to the model
B.Reduce the learning rate
C.Increase the batch size
D.Increase the number of epochs
AnswerB

Reducing the learning rate can help the model converge more stably and reduce overfitting.

Why this answer

The increasing validation loss while training loss decreases is a classic sign of overfitting. Reducing the learning rate (Option B) is the first step to stabilize training by allowing the optimizer to take smaller, more controlled steps, which can help the model converge to a better local minimum and reduce validation loss. In SageMaker, this is typically adjusted via the `learning_rate` hyperparameter in the estimator.

Exam trap

The trap here is that candidates often confuse overfitting with underfitting and incorrectly choose to add more features or increase epochs, not realizing that the validation loss increase is a direct sign of overfitting that requires reducing model capacity or learning rate.

How to eliminate wrong answers

Option A is wrong because adding more features increases model complexity, which typically worsens overfitting by giving the model more capacity to memorize noise. Option C is wrong because increasing batch size provides a more accurate gradient estimate but does not directly address overfitting; it may even lead to sharper minima and worse generalization. Option D is wrong because increasing the number of epochs gives the model more iterations to overfit, which will further increase validation loss.

614
MCQhard

Refer to the exhibit. A data scientist runs the above AWS CLI command to create a SageMaker training job using the built-in Linear Learner algorithm. The training job fails with an error. What is the most likely cause?

A.The S3 data type is AugmentedManifestFile, but Linear Learner requires RecordIO or CSV
B.The IAM role does not have sufficient permissions
C.The instance type ml.m5.large does not support the Linear Learner algorithm
D.The MaxRuntimeInSeconds is too short
AnswerA

Linear Learner does not support augmented manifest.

Why this answer

The command uses `AugmentedManifestFile` as the S3 data type, but Linear Learner expects `RecordIO` or `CSV` format, not augmented manifest. Augmented manifest is for algorithms that support it, like object detection. Linear Learner requires `S3DataType` to be `RecordIO` or `CSV`.

Also the content type is `application/x-recordio` which is correct for RecordIO, but the data type is wrong. So the error is due to the S3 data type. Option C is correct.

Option A: The IAM role is present. Option B: Instance type is fine. Option D: Max runtime is fine.

615
Multi-Selecteasy

A machine learning engineer is deploying a model using Amazon SageMaker. The model requires preprocessing steps (e.g., scaling, encoding) that were applied during training. Which TWO options can ensure the same preprocessing is applied at inference?

Select 2 answers
A.Implement preprocessing as an AWS Lambda function invoked before inference.
B.Deploy a separate preprocessing endpoint and call it before the model endpoint.
C.Retrain the model in each inference request with the preprocessing applied.
D.Create a Scikit-learn pipeline that includes preprocessing and the model, then deploy it.
E.Use SageMaker Inference Pipeline to chain a preprocessing container with the model container.
AnswersD, E

The pipeline ensures consistent transformation during training and inference.

Why this answer

Options A and D are correct. Scikit-learn pipelines bundle preprocessing and model into a single object. SageMaker Inference Pipelines chain preprocessing and prediction containers.

Option B is wrong because Lambda function may introduce inconsistencies. Option C is wrong because separate endpoint adds complexity. Option E is wrong because re-training the model in each inference request is impractical.

616
Multi-Selecteasy

Which TWO of the following are true about the bias-variance tradeoff?

Select 2 answers
A.Ensemble methods like bagging increase variance
B.Simple models tend to have high variance
C.High variance can cause overfitting
D.High bias can cause underfitting
E.High variance models are typically too simple
AnswersC, D

High variance means the model is very sensitive to training data, leading to overfitting.

Why this answer

Option A is correct because high bias leads to underfitting. Option C is correct because high variance leads to overfitting. Option B is wrong because high bias models are not complex.

Option D is wrong because simple models have high bias. Option E is wrong because ensemble methods reduce variance.

617
MCQhard

A team is building a model to predict customer churn. They have 50 features, including categorical variables with high cardinality (e.g., zip code with 10,000 unique values). Which feature engineering technique is most appropriate?

A.Binning zip codes into regions
B.Target encoding
C.Label encoding
D.One-hot encoding
AnswerB

Target encoding condenses high cardinality into one numeric feature.

Why this answer

Target encoding replaces each category with the mean of the target variable, which handles high cardinality well. Option A is wrong because one-hot encoding would create 10,000 binary columns, causing high dimensionality. Option B is wrong because label encoding implies ordinality.

Option D is wrong because binning reduces cardinality but loses information.

618
MCQmedium

A data scientist is training a deep learning model on a GPU instance. The training loss is decreasing, but the validation loss starts increasing after a few epochs. Which action should the data scientist take to address this?

A.Reduce the batch size
B.Implement early stopping
C.Increase the learning rate
D.Add more layers to the model
AnswerB

Early stopping halts training when validation loss increases.

Why this answer

Option B is correct because early stopping stops training when validation loss starts increasing, preventing overfitting. Option A is wrong because increasing learning rate may cause divergence. Option C is wrong because adding more layers increases complexity and overfitting.

Option D is wrong because reducing batch size may increase noise.

619
MCQeasy

A company is using Amazon SageMaker to train a linear learner model for predicting customer lifetime value. The target variable is right-skewed with a long tail. The data scientist applies a log transformation to the target variable and trains the model. The model achieves a low root mean squared error (RMSE) on the log scale. However, when the predictions are exponentiated back to the original scale, the RMSE is much higher. Which step should the data scientist take to improve the model's performance on the original scale?

A.Increase the regularization strength
B.Remove outliers from the training data
C.Use a loss function that models the original distribution, such as Poisson or Tweedie
D.Use a deep learning model instead of linear learner
AnswerC

These loss functions handle skewed distributions better.

Why this answer

Option B (use a loss function like Poisson or Tweedie) is appropriate for non-negative skewed targets. Option A (remove outliers) may lose data. Option C (use a different algorithm) may not address the issue.

Option D (increase regularization) may not help.

620
Multi-Selecthard

Which THREE of the following are valid strategies to reduce overfitting in a deep neural network? (Choose 3)

Select 3 answers
A.Increase the number of layers.
B.Use early stopping.
C.Increase the learning rate.
D.Add L2 regularization to the loss function.
E.Use dropout layers.
AnswersB, D, E

Early stopping prevents overfitting.

Why this answer

Option A is correct because L2 regularization penalizes large weights. Option C is correct because dropout randomly drops units to prevent co-adaptation. Option E is correct because early stopping prevents overfitting.

Option B is wrong because increasing model capacity increases overfitting. Option D is wrong because increasing learning rate may cause divergence.

621
Multi-Selecteasy

Which TWO of the following are appropriate use cases for using Amazon SageMaker BlazingText? (Choose 2)

Select 2 answers
A.Text classification using supervised learning.
B.Time series forecasting.
C.Learning word embeddings from a large text corpus.
D.Classifying images.
E.Sequence-to-sequence translation.
AnswersA, C

BlazingText has supervised mode.

Why this answer

Option A is correct because BlazingText supports Word2Vec embeddings. Option C is correct because BlazingText supports text classification with supervised mode. Option B is wrong because image classification is not supported.

Option D is wrong because sequence-to-sequence is not supported. Option E is wrong because time series forecasting is not supported.

622
MCQmedium

A company is building a recommendation system for an e-commerce platform. The data includes user-item interactions and features such as user demographics and item categories. Which algorithm would be most appropriate for generating personalized recommendations?

A.XGBoost
B.Factorization Machines
C.k-means clustering
D.Principal Component Analysis (PCA)
AnswerB

Factorization Machines model pairwise feature interactions and work well with sparse data, making them suitable for recommendation systems.

Why this answer

Factorization Machines (FM) are specifically designed for recommendation tasks with sparse, high-dimensional data like user-item interactions. They model pairwise feature interactions (e.g., user demographics × item categories) using factorized parameters, enabling personalized recommendations even when many user-item pairs are unobserved. This makes FM far more effective than tree-based or clustering methods for collaborative filtering and feature-rich recommendation scenarios.

Exam trap

Cisco often tests whether candidates confuse general-purpose ML algorithms (like XGBoost or clustering) with specialized recommendation algorithms, expecting you to recognize that factorization machines are the only option designed for sparse interaction data and feature crosses.

How to eliminate wrong answers

Option A (XGBoost) is wrong because it is a tree-based ensemble method that struggles with sparse, high-cardinality categorical features common in recommendation data; it cannot efficiently learn latent interaction patterns between users and items without extensive feature engineering. Option C (k-means clustering) is wrong because it is an unsupervised clustering algorithm that groups users or items into clusters, but it cannot generate personalized recommendations that account for individual user-item interactions or feature crosses. Option D (PCA) is wrong because it is a dimensionality reduction technique that transforms features into uncorrelated principal components, losing interpretability and failing to model the pairwise feature interactions needed for personalized recommendations.

623
MCQhard

Refer to the exhibit. A data scientist is trying to create a SageMaker training job but receives an access denied error. The IAM policy shown is attached to their role. What is the most likely reason for the error?

A.The policy only allows CreateTrainingJob when the training job status is 'Failed', which is never true initially
B.The Action is not allowed because 'CreateTrainingJob' is misspelled
C.There is an explicit deny in another policy
D.The Resource is set to '*' which does not include the specific training job ARN
AnswerA

Condition prevents creation.

Why this answer

Option A is correct because the IAM policy uses a `Condition` block with `sagemaker:TrainingJobStatus` set to `Failed`. When a `CreateTrainingJob` API call is made, the training job status is not yet set (it is `Creating` or `InProgress`), so the condition evaluates to false, and the request is denied. The policy only grants permission when the status equals `Failed`, which never occurs at creation time.

Exam trap

Cisco often tests the nuance that IAM condition keys like `sagemaker:TrainingJobStatus` are evaluated against the current state of the resource at the time of the API call, and candidates mistakenly assume a wildcard resource or a missing action is the issue rather than a condition that never matches.

How to eliminate wrong answers

Option B is wrong because 'CreateTrainingJob' is the correct AWS API action name; there is no misspelling in the policy. Option C is wrong because while an explicit deny in another policy could cause an access denied error, the question asks for the 'most likely' reason, and the given policy's condition is a direct and obvious cause. Option D is wrong because the `Resource` element set to `'*'` in a SageMaker training job policy actually covers all training job ARNs, so it is not the source of the denial.

624
MCQhard

A data scientist is training a neural network using a custom loss function. The training process converges, but the model's performance on the validation set is poor. The data scientist suspects that the model is overfitting. Which action should the data scientist take to diagnose overfitting?

A.Plot the training and validation loss over epochs
B.Add more layers to the network
C.Increase the learning rate
D.Compute the confusion matrix on the training set
AnswerA

If training loss decreases while validation loss increases, it indicates overfitting.

Why this answer

Plotting the training and validation loss over epochs is the standard diagnostic technique for detecting overfitting. If the training loss continues to decrease while the validation loss plateaus or increases, it indicates that the model is memorizing the training data rather than generalizing. This visual comparison directly confirms overfitting, allowing the data scientist to take corrective action such as regularization or early stopping.

Exam trap

Cisco often tests the misconception that improving training performance (e.g., by adding layers or increasing learning rate) is a valid diagnostic step, when in fact the correct approach is to compare training and validation metrics to detect overfitting.

How to eliminate wrong answers

Option B is wrong because adding more layers increases model capacity, which typically exacerbates overfitting rather than diagnosing it. Option C is wrong because increasing the learning rate can cause training instability or divergence, but it does not help identify whether overfitting is occurring. Option D is wrong because computing the confusion matrix on the training set only shows performance on training data, which is already expected to be high when overfitting; it provides no comparison to validation performance and thus cannot diagnose overfitting.

← PreviousPage 9 of 9 · 624 questions total

Ready to test yourself?

Try a timed practice session using only Modeling questions.