Courseiva

CCNA Ml Modeling Questions

75 of 603 questions · Page 7/9 · Ml Modeling topic · Answers revealed

451
MCQmedium

Refer to the exhibit. A data scientist is trying to run a SageMaker training job using a script that reads data from the S3 bucket 'my-bucket' and writes the model artifact to the same bucket. The training job fails with an access denied error. What is the likely cause?

A.The IAM role does not have permission to write to the S3 bucket for the model artifact
B.The IAM role does not have sagemaker:CreateModel permission
C.The IAM role does not have s3:ListBucket permission
D.The IAM role does not have ec2:DescribeInstances permission
AnswerA

The policy only allows PutObject on training-data/*, but the model artifact might be saved to a different prefix (e.g., output/).

Why this answer

The training job fails with an access denied error because the IAM role used by SageMaker lacks the s3:PutObject permission (or equivalent write access) for the S3 bucket 'my-bucket'. While the script reads data from the bucket, writing the model artifact requires explicit write permissions on the same bucket. Without this, SageMaker cannot upload the model artifact, causing the job to fail.

Exam trap

The trap here is that candidates may focus on the read operation (data input) and overlook the write operation (model artifact output), or confuse S3 permissions with SageMaker-specific API actions like CreateModel.

How to eliminate wrong answers

Option B is wrong because sagemaker:CreateModel is a permission for creating a SageMaker model resource after training, not for writing to S3 during the training job; the error occurs during training, not model creation. Option C is wrong because s3:ListBucket is a read permission for listing objects, and the job already reads data successfully (the error is on write), so lack of ListBucket would cause a different error (e.g., 403 on list). Option D is wrong because ec2:DescribeInstances is unrelated to S3 access; it is used for managing EC2 instances, not for SageMaker training jobs writing to S3.

452
Multi-Selectmedium

A data scientist is building a binary classifier to predict customer churn. The dataset is highly imbalanced (5% churn). Which TWO techniques can help improve the model's ability to detect churn?

Select 2 answers
A.Downsample the majority class to balance the dataset
B.Use Synthetic Minority Over-sampling Technique (SMOTE)
C.Use class weights in the loss function to penalize misclassifications of the minority class
D.Use accuracy as the evaluation metric
E.Increase the model complexity by adding more layers
AnswersB, C

SMOTE generates synthetic samples for the minority class.

Why this answer

SMOTE generates synthetic samples for the minority class by interpolating between existing minority instances, effectively balancing the dataset and providing the model with more diverse churn examples to learn from. This directly addresses the class imbalance problem without losing information from the majority class.

Exam trap

The trap here is that candidates often assume downsampling (Option A) is always beneficial for imbalance, but it can discard critical majority class patterns, whereas SMOTE and class weights (Options B and C) preserve data while directly targeting the minority class.

453
MCQeasy

A machine learning engineer is deploying a model using Amazon SageMaker and wants to automatically scale the endpoint based on the number of incoming requests. Which scaling policy should be used?

A.Step scaling
B.Scheduled scaling
C.Target tracking scaling
D.Simple scaling
AnswerC

Target tracking automatically adjusts capacity based on a target metric.

Why this answer

Amazon SageMaker endpoints support Application Auto Scaling. A target tracking scaling policy (Option C) is the recommended approach when you want to automatically scale based on a metric like InvocationsPerInstance. It adjusts capacity to maintain the target value of the metric.

Step scaling (Option A) requires defining step adjustments and thresholds. Simple scaling is no longer recommended by AWS. Scheduled scaling (Option B) is for predictable traffic patterns.

Therefore, Option C is correct.

454
MCQeasy

A machine learning team needs to deploy a model that makes real-time predictions with latency under 100 ms. The model is a deep neural network with 500 MB of parameters. Which AWS service should they use?

A.AWS Glue
B.AWS Lambda with a container image
C.Amazon SageMaker real-time endpoint
D.Amazon EMR
AnswerC

SageMaker real-time endpoints provide low-latency inference for large models.

Why this answer

Amazon SageMaker real-time endpoints are purpose-built for low-latency inference and can host large models like this 500 MB deep neural network by using appropriate instance types or multi-model endpoints. Option A (AWS Glue) is an ETL service, not for real-time inference. Option B (AWS Lambda) has a 250 MB deployment package limit and cold start latency that would exceed the 100 ms requirement for a 500 MB model.

Option D (Amazon EMR) is designed for big data processing with Hadoop/Spark, not for real-time predictions. Therefore, the correct choice is Amazon SageMaker real-time endpoint.

455
MCQhard

A machine learning team is deploying a real-time inference endpoint for a recommendation model using Amazon SageMaker. The model takes a long time to load (several minutes) due to its size (5 GB). Which deployment strategy minimizes the cold start latency?

A.Use a single instance with a large memory size
B.Use Multi-Model Endpoints to keep the model loaded between invocations
C.Use SageMaker Serverless Inference
D.Use a larger instance type with more vCPUs
AnswerB

Multi-Model Endpoints allow models to stay loaded in memory, reducing cold start.

Why this answer

Multi-Model Endpoints (MME) allow multiple models to be loaded on the same endpoint and keep them cached in memory between invocations, reducing cold start latency for subsequent calls. This is ideal for large models like the 5 GB recommendation model. Option A (single instance with large memory) does not address load time.

Option C (Serverless Inference) incurs cold starts on each invocation. Option D (larger instance type with more vCPUs) may speed up loading but does not prevent cold starts after idle periods. Thus, MMEs minimize cold start by maintaining model persistence.

456
Multi-Selectmedium

A data scientist is training a deep learning model for object detection using Amazon SageMaker. The training job is using a single GPU instance and is taking too long. Which THREE actions can reduce training time? (Choose THREE.)

Select 3 answers
A.Use a CPU instance instead of GPU
B.Enable mixed precision training with FP16
C.Use a GPU instance with more GPUs, such as p3.16xlarge
D.Reduce the batch size
E.Use distributed training across multiple instances
AnswersB, C, E

Mixed precision uses half-precision floats, speeding up computation and reducing memory usage.

Why this answer

Enabling mixed precision training with FP16 reduces memory usage and accelerates computation by using half-precision floating-point numbers where possible, which is particularly effective on NVIDIA GPUs with Tensor Cores (e.g., V100, A100). This can nearly double throughput for deep learning models without sacrificing model accuracy, as critical operations still use FP32 precision.

Exam trap

The trap here is that candidates often confuse reducing batch size with speeding up training, but in practice, smaller batches increase the number of gradient updates and can lead to longer wall-clock time, especially on GPU instances where larger batches better utilize parallel hardware.

457
MCQmedium

A data scientist is deploying a regression model in Amazon SageMaker that predicts housing prices. The model shows high bias (underfitting). Which action is most likely to reduce bias?

A.Reduce the amount of training data
B.Increase regularization strength
C.Use a simpler model
D.Add more features or increase model complexity
AnswerD

More complex models can capture patterns better.

Why this answer

High bias (underfitting) means the model is too simple to capture the underlying patterns in the data. Adding more features or increasing model complexity (e.g., using polynomial features, deeper trees, or a more flexible algorithm) directly addresses underfitting by giving the model greater capacity to learn from the data. In Amazon SageMaker, this could involve using a more complex built-in algorithm like XGBoost with deeper trees or adding feature engineering transformations in a processing job.

Exam trap

The trap here is that candidates often confuse bias with variance and incorrectly choose regularization or simpler models, which are solutions for overfitting (high variance), not underfitting (high bias).

How to eliminate wrong answers

Option A is wrong because reducing the amount of training data would exacerbate underfitting by providing even less information for the model to learn from. Option B is wrong because increasing regularization strength penalizes model complexity further, which would increase bias and worsen underfitting. Option C is wrong because using a simpler model would reduce capacity even more, directly increasing bias rather than reducing it.

458
Multi-Selecteasy

A data scientist is evaluating a regression model. Which TWO metrics are appropriate for evaluating regression performance?

Select 2 answers
A.Root Mean Squared Error (RMSE)
B.F1 score
C.Area Under the ROC Curve (AUC)
D.R-squared
E.Precision
AnswersA, D

RMSE measures average prediction error.

Why this answer

Root Mean Squared Error (RMSE) is a standard metric for regression models because it measures the average magnitude of prediction errors in the same units as the target variable. It penalizes larger errors more heavily due to squaring, making it sensitive to outliers, which is useful for evaluating model accuracy in continuous value prediction.

Exam trap

The MLS-C01 exam often tests the distinction between classification and regression metrics, and the trap here is that candidates mistakenly apply classification metrics like F1, AUC, or Precision to regression problems because they confuse evaluation domains.

459
MCQeasy

A company is using Amazon SageMaker to train a XGBoost model for predicting customer churn. The training data is stored in an S3 bucket as CSV files. The data scientist runs a hyperparameter tuning job with 50 training jobs. The tuning job completes, but the best model's accuracy on the holdout set is lower than expected. The data scientist suspects that the hyperparameter ranges are too narrow. Which corrective action is most appropriate?

A.Increase the number of training jobs in the tuning job
B.Switch to a different algorithm like Random Forest
C.Expand the hyperparameter ranges for key parameters such as 'max_depth', 'learning_rate', and 'subsample'
D.Change the tuning strategy from random search to Bayesian optimization
AnswerC

Wider ranges allow the tuning job to explore more of the hyperparameter space, potentially finding better configurations.

Why this answer

The data scientist suspects the hyperparameter ranges are too narrow, which directly limits the model's ability to find an optimal configuration. Expanding ranges for key XGBoost parameters like 'max_depth', 'learning_rate', and 'subsample' allows the tuning job to explore a broader space of model complexities and regularization levels, potentially improving accuracy on the holdout set. This is the most direct fix for the stated problem, as it addresses the root cause rather than increasing job count or changing the search strategy.

Exam trap

The trap here is that candidates often confuse 'more training jobs' (Option A) with 'broader search space', failing to recognize that increasing jobs only refines sampling within existing bounds, not expands them.

How to eliminate wrong answers

Option A is wrong because increasing the number of training jobs does not address the core issue of narrow hyperparameter ranges; it only samples the same limited space more densely, which may not yield a better model if the true optimum lies outside the current bounds. Option B is wrong because switching to a different algorithm like Random Forest is an unnecessary and drastic change; the problem is explicitly about hyperparameter ranges, not algorithm suitability, and XGBoost is a strong choice for tabular churn data. Option D is wrong because changing from random search to Bayesian optimization improves sampling efficiency but does not expand the search space; if the ranges are too narrow, even a more intelligent search cannot find a better configuration outside those bounds.

460
MCQhard

A company is using Amazon SageMaker to host a model for real-time inference. The model is a large ensemble of 10 XGBoost models, each 2 GB. The endpoint uses a single ml.c5.18xlarge instance. The inference latency is high (average 2 seconds). Which change would most effectively reduce latency?

A.Use SageMaker Multi-Model Endpoints to serve each model independently
B.Switch to a GPU instance type
C.Add more instances behind a load balancer
D.Use SageMaker Batch Transform instead of real-time endpoint
AnswerA

Multi-Model Endpoints reduce serialization overhead by loading models on demand.

Why this answer

Serialization/deserialization of large models is a bottleneck; SageMaker Multi-Model Endpoints can reduce overhead by loading only the requested model. Option B (GPU) may not help if the bottleneck is CPU. Option C (Add more instances) helps throughput but not per-request latency.

Option D (Batch Transform) is for offline inference.

461
MCQeasy

A data scientist is using Amazon SageMaker to train a linear regression model. The training data has 10 features, and the scientist wants to interpret the model's coefficients. Which algorithm should they use?

A.Amazon SageMaker XGBoost
B.Amazon SageMaker K-Means
C.Amazon SageMaker Factorization Machines
D.Amazon SageMaker Linear Learner
AnswerD

Produces linear coefficients for interpretation.

Why this answer

Amazon SageMaker Linear Learner provides interpretable coefficients, which is essential for understanding the impact of each feature in a linear regression model. Option A is wrong because XGBoost is a tree-based ensemble method that is less interpretable and does not provide linear coefficients. Option B is wrong because K-Means is an unsupervised clustering algorithm, not suited for regression.

Option C is wrong because Factorization Machines are designed for high-dimensional sparse data and are not the standard choice for linear regression with 10 features.

462
MCQmedium

A company uses an XGBoost model to predict equipment failures. The model has high precision but low recall. The business impact of a false negative is very high (missing a failure). Which action would MOST effectively increase recall while keeping precision reasonably high?

A.Increase the regularization parameter lambda
B.Set the objective to 'reg:squarederror'
C.Decrease the probability threshold for the positive class
D.Increase the number of boosting rounds
AnswerC

Lower threshold increases recall but may reduce precision.

Why this answer

Decreasing the probability threshold for the positive class means the model will classify a case as a failure at a lower predicted probability, which captures more true positives (increases recall). However, this also allows more false positives, so precision may drop, but the trade-off is acceptable given the high cost of false negatives. This is a standard post-training calibration technique for imbalanced classification problems.

Exam trap

The MLS-C01 exam often tests the misconception that increasing boosting rounds or regularization directly improves recall, when in fact the probability threshold is the primary lever for trading off precision and recall after training.

How to eliminate wrong answers

Option A is wrong because increasing the regularization parameter lambda (L2 regularization) reduces model complexity and can lead to underfitting, which typically decreases both precision and recall, not selectively increase recall. Option B is wrong because setting the objective to 'reg:squarederror' treats the problem as regression, not classification, so the model outputs continuous values without a probability threshold, making it unsuitable for recall-focused binary classification. Option D is wrong because increasing the number of boosting rounds can lead to overfitting, which may increase variance and actually degrade recall on unseen data, and does not directly control the trade-off between precision and recall.

463
MCQeasy

A company wants to deploy a machine learning model that provides real-time inference with low latency. The model is a small ensemble of three tree-based models. Which Amazon SageMaker approach is most appropriate?

A.Use a SageMaker real-time endpoint with a single inference container.
B.Use a SageMaker batch transform job.
C.Use AWS Lambda with the model packaged in a layer.
D.Use a SageMaker Serverless Inference endpoint.
AnswerA

Real-time endpoints provide low-latency inference.

Why this answer

A SageMaker real-time endpoint with a single inference container is the most appropriate approach because it provides persistent, low-latency inference by keeping the model loaded in memory and handling requests synchronously. For a small ensemble of three tree-based models, a single container can host all models (e.g., using a custom inference script or a multi-model endpoint) and deliver sub-second response times, meeting the real-time requirement.

Exam trap

The trap here is that candidates often confuse 'real-time inference' with 'serverless' or 'batch processing,' assuming that serverless or Lambda are always cheaper or simpler, but they fail to account for cold-start latency and execution limits that break low-latency requirements.

How to eliminate wrong answers

Option B is wrong because SageMaker batch transform jobs are designed for asynchronous, offline inference on large datasets and do not provide real-time, low-latency responses. Option C is wrong because AWS Lambda has a maximum execution timeout of 15 minutes and limited memory (up to 10 GB), making it unsuitable for hosting even a small ensemble of models that require persistent, low-latency inference; additionally, packaging models in Lambda layers adds cold-start latency and complexity. Option D is wrong because SageMaker Serverless Inference endpoints automatically scale to zero when not in use, incurring cold-start latency that can exceed acceptable thresholds for real-time inference, and they are optimized for intermittent or bursty traffic, not sustained low-latency workloads.

464
MCQeasy

A data scientist is training a linear regression model to predict house prices. The dataset contains 10 features. After training, the data scientist notices that the model has high bias (underfitting). Which action should the data scientist take to reduce bias?

A.Reduce the amount of training data
B.Add more features, such as polynomial features
C.Increase the regularization strength
D.Use a simpler model, such as ridge regression
AnswerB

Adding features increases model complexity, reducing bias.

Why this answer

High bias (underfitting) means the model is too simple to capture the underlying patterns in the data. Adding more features, such as polynomial features, increases model complexity, allowing the linear regression model to fit non-linear relationships and reduce bias. This directly addresses the underfitting issue by giving the model more expressive power.

Exam trap

The MLS-C01 exam often tests the bias-variance tradeoff by making candidates confuse regularization (which reduces variance) with the need to increase model complexity to fix underfitting; the trap here is that increasing regularization or using a simpler model seems like a 'safe' choice, but it actually worsens bias.

How to eliminate wrong answers

Option A is wrong because reducing the amount of training data would increase variance and potentially worsen bias, as the model would have even less information to learn from. Option C is wrong because increasing regularization strength penalizes model complexity, which would further increase bias by forcing the model to be simpler. Option D is wrong because using a simpler model, such as ridge regression (which is a regularized linear model), would also increase bias by constraining the coefficients, making underfitting worse.

465
MCQmedium

A data scientist is using Amazon SageMaker to train a deep learning model using a built-in algorithm. The training job uses an ml.p3.2xlarge instance and takes 10 hours to complete. The scientist wants to reduce training time without changing the algorithm or model architecture. The instance's GPU utilization is consistently at 95%, but CPU utilization is only 20%. The data input pipeline uses SageMaker Pipe mode with the 'TrainingInputMode' set to 'Pipe'. The training dataset is 200 GB in CSV format stored in S3. Which approach is most likely to reduce training time?

A.Switch from Pipe mode to File mode to reduce I/O overhead
B.Use Pipe mode with 'S3DataType' as 'AugmentedManifestFile'
C.Use a larger instance type with more GPUs, such as ml.p3.8xlarge
D.Reduce the batch size to improve GPU utilization
AnswerC

More GPUs can parallelize computation and reduce training time.

Why this answer

GPU utilization is already at 95%, indicating the GPU is the bottleneck. Switching to a larger instance type like ml.p3.8xlarge provides four times the number of GPUs (4 vs. 1), allowing parallel processing of more data and directly reducing wall-clock training time without altering the algorithm or model architecture. The low CPU utilization (20%) confirms that the data pipeline is not a bottleneck, so I/O optimizations are unlikely to help.

Exam trap

The trap here is that candidates often assume low CPU utilization indicates an I/O bottleneck and choose to optimize the data pipeline (e.g., Pipe mode changes), when in fact the high GPU utilization reveals the true bottleneck is compute capacity, making a larger instance with more GPUs the correct solution.

How to eliminate wrong answers

Option A is wrong because switching from Pipe mode to File mode would increase I/O overhead by downloading the entire 200 GB dataset to the instance's local storage, which would not reduce training time given that GPU utilization is already high and CPU is underutilized. Option B is wrong because using 'AugmentedManifestFile' with Pipe mode is designed for metadata and label handling, not for improving data throughput; it would not address the GPU bottleneck. Option D is wrong because reducing the batch size would decrease GPU utilization (currently at 95%), potentially increasing training time as the GPU would spend more time on overhead and less on computation.

466
MCQeasy

A data scientist wants to build a binary classifier to predict customer churn. The dataset has 10,000 records with 500 churners (5%). Which technique should the data scientist use to address class imbalance?

A.Randomly undersample the majority class.
B.Use SMOTE (Synthetic Minority Over-sampling Technique) to create synthetic samples.
C.Assign higher class weights to the minority class.
D.Downsample the majority class to match the minority class size.
AnswerB

SMOTE generates synthetic samples for the minority class, addressing imbalance without losing data.

Why this answer

SMOTE (Synthetic Minority Over-sampling Technique) creates synthetic samples for the minority class, effectively balancing the dataset without losing information. Option A (Randomly undersampling the majority class) discards potentially useful data. Option C (Assigning higher class weights to the minority class) is a valid approach but not a data-level technique; it adjusts the loss function.

Option D (Downsampling the majority class) also loses data and is similar to undersampling.

467
MCQeasy

A data scientist is using SageMaker to train a linear regression model. The target variable has a long-tail distribution. Which data transformation is LEAST likely to improve model performance?

A.Add interaction terms between features
B.Apply log transformation to the target variable
C.Normalize all feature values to [0,1]
D.Remove outliers from the target variable
AnswerC

Normalization does not affect linear regression's coefficients; it's not needed.

Why this answer

Normalizing feature values to [0,1] is a scaling technique that does not address the long-tail distribution of the target variable. Long-tail distributions typically require transformations that compress the tail (e.g., log or Box-Cox) to make the relationship more linear and reduce the influence of extreme values. Feature normalization helps with gradient descent convergence but does not fix skewness in the target, so it is least likely to improve model performance for this specific issue.

Exam trap

The trap here is that candidates often confuse feature scaling (normalization) with target transformation, assuming that normalizing features will also fix target skewness, but the question specifically asks about the transformation least likely to improve performance for a long-tail target distribution.

How to eliminate wrong answers

Option A is wrong because adding interaction terms can capture non-linear relationships between features, which may help the linear regression model better fit the long-tail distribution by modeling complex dependencies. Option B is wrong because applying a log transformation to the target variable is a standard technique to reduce skewness and compress the long tail, making the distribution more Gaussian and improving linear regression assumptions. Option D is wrong because removing outliers from the target variable can reduce the influence of extreme values in the long tail, potentially improving model fit and prediction accuracy.

468
MCQeasy

A company wants to build a model to detect fraudulent transactions. The dataset has a highly imbalanced class distribution. Which technique should be used during training to handle class imbalance?

A.Add more features to the dataset
B.Use SageMaker's built-in fraud detection algorithm that applies random under-sampling
C.Reduce the learning rate
D.Increase the tree depth in XGBoost
AnswerB

Correct. SageMaker's built-in fraud detection algorithm uses random under-sampling, an effective technique for handling class imbalance.

Why this answer

Using a fraud detection algorithm that applies random under-sampling is a standard resampling technique to handle class imbalance. AWS SageMaker provides a built-in fraud detection algorithm that incorporates random under-sampling to balance the dataset. Option A is incorrect because adding features does not directly address imbalance.

Option C is incorrect as learning rate affects convergence, not imbalance. Option D is incorrect because increasing tree depth alone can lead to overfitting and does not specifically handle class imbalance.

469
MCQmedium

A data scientist is using an IAM role with the policy shown in the exhibit to train a model in SageMaker. The training job fails with a permissions error. What is the missing permission?

A.sagemaker:InvokeEndpoint
B.sagemaker:DescribeTrainingJob
C.s3:ListBucket
D.iam:PassRole
AnswerD

SageMaker requires iam:PassRole to use the execution role.

Why this answer

The training job fails because SageMaker needs to assume the IAM role specified in the training job configuration to access resources like S3 buckets. The `iam:PassRole` permission is required to allow the SageMaker service to pass that role to the training job. Without it, SageMaker cannot assume the role and thus cannot perform actions such as reading training data from S3.

Exam trap

The trap here is that candidates often focus on S3 or SageMaker-specific actions (like `s3:GetObject` or `sagemaker:CreateTrainingJob`) and overlook the prerequisite `iam:PassRole` permission, which is required for SageMaker to assume the role on behalf of the user.

How to eliminate wrong answers

Option A is wrong because `sagemaker:InvokeEndpoint` is used for invoking a deployed endpoint for inference, not for training jobs. Option B is wrong because `sagemaker:DescribeTrainingJob` is a read-only action that allows viewing training job metadata, not a permission required to launch or execute a training job. Option C is wrong because `s3:ListBucket` is an S3 action that might be needed for listing objects in a bucket, but the core issue is that SageMaker cannot assume the IAM role at all, so S3 permissions are irrelevant until the role is passed.

470
MCQhard

A data scientist is training a binary classifier using logistic regression. The dataset has 100,000 samples and 500 features. After training, the model achieves 95% accuracy on the training set but only 70% on the test set. The data scientist suspects overfitting. Which technique would best reduce overfitting while preserving interpretability?

A.Apply L1 regularization (Lasso)
B.Increase the maximum number of iterations
C.Add polynomial features
D.Use a random forest model instead
AnswerA

L1 regularization performs feature selection, reducing overfitting and keeping the model interpretable.

Why this answer

L1 regularization (Lasso) adds a penalty equal to the absolute value of the magnitude of coefficients, which drives many feature weights to exactly zero. This performs automatic feature selection, reducing model complexity and overfitting while keeping the model as a simple linear logistic regression, thus preserving interpretability.

Exam trap

AWS often tests the distinction between regularization techniques that shrink coefficients (L2/Ridge) versus those that zero them out (L1/Lasso), and candidates may mistakenly choose L2 or fail to recognize that L1 directly improves interpretability by removing irrelevant features.

How to eliminate wrong answers

Option B is wrong because increasing the maximum number of iterations only ensures the optimization algorithm converges; it does not address overfitting and may even lead to further overfitting if the model is already fitting noise. Option C is wrong because adding polynomial features increases model complexity and the number of parameters, which would worsen overfitting rather than reduce it. Option D is wrong because while a random forest can reduce overfitting through ensemble averaging, it is a non-linear black-box model that sacrifices the interpretability of logistic regression's coefficient-based explanations.

471
MCQhard

A company is using Amazon SageMaker to train a time series forecasting model using the DeepAR algorithm. The training data contains multiple time series. The model is overfitting. Which action is LEAST likely to reduce overfitting?

A.Decrease the number of layers in the neural network.
B.Increase the dropout rate.
C.Decrease the context length.
D.Reduce the number of time series in the training set.
AnswerD

Less data may worsen overfitting.

Why this answer

Reducing the number of time series in the training set reduces the diversity of training data, which typically increases overfitting rather than reducing it. DeepAR relies on learning patterns across multiple related time series to generalize well; fewer time series mean less shared statistical strength, making the model more likely to memorize noise in the remaining series.

Exam trap

The trap here is that candidates mistakenly think reducing training data always reduces overfitting, but in time series forecasting with DeepAR, fewer time series actually weaken the cross-series learning that regularizes the model, making overfitting worse.

How to eliminate wrong answers

Option A is wrong because decreasing the number of layers reduces the model's capacity, which directly combats overfitting by limiting the complexity of learned representations. Option B is wrong because increasing the dropout rate randomly drops neurons during training, which acts as a regularization technique to prevent co-adaptation and reduce overfitting. Option C is wrong because decreasing the context length shortens the look-back window, forcing the model to rely on fewer historical points and reducing its ability to memorize long-term patterns, which helps mitigate overfitting.

472
MCQhard

A company uses Amazon SageMaker to host a model for real-time inference. The model is a large ensemble of 10 deep learning models, each 500 MB. The total model size is 5 GB, which exceeds the 5 GB limit for SageMaker real-time endpoints. The data scientist wants to reduce the model size without significantly impacting accuracy. The ensemble uses averaging of predictions from all models. The scientist has access to a validation set with 10,000 samples. Which technique should the scientist use to reduce the model size?

A.Use model distillation to train a smaller model that approximates the ensemble
B.Use a more expensive instance type to host the model
C.Use SageMaker Neo to compile and optimize the model
D.Apply weight pruning to each model in the ensemble
AnswerA

Distillation produces a compact model with similar performance.

Why this answer

Model distillation trains a smaller student model to mimic the ensemble, reducing size while preserving accuracy. Option B is wrong because price-aware instance selection does not reduce model size. Option C is wrong because SageMaker Neo is for optimization, not size reduction below 5 GB.

Option D is wrong because pruning alone may not reduce size enough.

473
MCQmedium

A company uses Amazon SageMaker to train a deep learning model for image classification. The training job is taking longer than expected. The data scientist observes that GPU utilization is low (around 30%) and CPU utilization is high. Which action is most likely to reduce training time?

A.Reduce the batch size
B.Increase the batch size
C.Increase the learning rate
D.Increase the number of data loading workers
AnswerD

More data loading workers can parallelize data preprocessing and reduce I/O bottleneck, improving GPU utilization.

Why this answer

Low GPU utilization with high CPU utilization indicates a data loading bottleneck where the CPU cannot prepare batches fast enough to keep the GPU busy. Increasing the number of data loading workers (e.g., SageMaker's `sagemaker.session.Session` or PyTorch `DataLoader` `num_workers`) allows parallel data preprocessing and I/O, reducing idle GPU time and overall training duration.

Exam trap

The trap here is that candidates often confuse low GPU utilization with a learning rate or batch size issue, when in fact the root cause is a data pipeline bottleneck that requires parallel data loading workers.

How to eliminate wrong answers

Option A is wrong because reducing the batch size decreases the amount of work per GPU step, which can further lower GPU utilization and increase overhead from more frequent weight updates. Option B is wrong because increasing the batch size without addressing the data loading bottleneck would worsen the CPU starvation, as larger batches require more data to be loaded per step, potentially increasing CPU wait time. Option C is wrong because increasing the learning rate does not resolve the CPU/GPU utilization imbalance; it affects convergence behavior, not data throughput or hardware utilization.

474
MCQmedium

A data scientist is building a fraud detection model using a highly imbalanced dataset. The model uses a random forest classifier. The recall for the minority class is 0.6, and precision is 0.9. The business requires recall above 0.8. Which action should the data scientist take to improve recall?

A.Perform feature selection to remove noisy features.
B.Increase the maximum depth of the trees.
C.Increase the class weight for the minority class in the algorithm.
D.Decrease the probability threshold for classifying a transaction as fraudulent.
E.Increase the number of trees in the random forest.
AnswerD

Decreasing the classification threshold for the positive class increases recall (more positives predicted) at the cost of precision.

Why this answer

Decreasing the probability threshold for classifying a transaction as fraudulent increases recall because more transactions are predicted as positive, capturing more true positives at the cost of precision. Option A (feature selection) might remove noisy features but could inadvertently eliminate informative ones, potentially reducing recall. Option B (increasing maximum depth of trees) increases model complexity and risk of overfitting without directly improving recall.

Option C (increasing class weight for the minority class) can help the model focus on the minority class, but if recall is still insufficient, threshold adjustment is a more direct approach. Option E (increasing number of trees) reduces variance and improves generalization but does not directly increase recall.

475
MCQhard

A data scientist runs a SageMaker training job and receives the above error. The S3 bucket 'my-bucket' contains a folder 'data' with a file 'data.csv'. What is the MOST likely cause of the error?

A.The instance type ml.m5.large does not have enough memory
B.The VolumeSizeInGB is too small to download the data
C.The S3 URI should be s3://my-bucket/data/data.csv instead of s3://my-bucket/data
D.The S3 bucket and the training job are in different regions
AnswerC

If the training script expects a single file, the S3 URI must point to the file directly.

Why this answer

The error occurs because the SageMaker training job expects a specific S3 object URI (pointing to a file), not a prefix (pointing to a folder). When you specify `s3://my-bucket/data`, SageMaker interprets it as a prefix and attempts to list objects under that prefix, but the training channel requires a direct file reference. Using `s3://my-bucket/data/data.csv` provides the exact object path, allowing SageMaker to download the file correctly.

Exam trap

The trap here is that candidates confuse S3 prefixes (folders) with S3 objects (files), assuming SageMaker can automatically resolve a folder to its contents, when in fact it requires an explicit file path for training data channels.

How to eliminate wrong answers

Option A is wrong because the error is about S3 URI format, not instance memory; ml.m5.large has sufficient memory for typical CSV processing. Option B is wrong because VolumeSizeInGB controls the local storage volume for the training instance, not the download of data from S3; SageMaker downloads data to the volume regardless of its size. Option D is wrong because cross-region S3 access would cause a different error (e.g., 'Access Denied' or 'BucketRegionError'), not a URI parsing error, and SageMaker training jobs can access buckets in different regions if the IAM role allows it.

476
Multi-Selecthard

Which THREE factors should be considered when selecting the appropriate algorithm for a regression problem? (Choose 3.)

Select 3 answers
A.The number of features relative to the number of samples
B.The interpretability requirements of the business stakeholders
C.The presence of non-linear relationships in the data
D.The time of day the training will occur
E.The color of the data scientist's laptop
AnswersA, B, C

High-dimensional data may require regularization.

Why this answer

The ratio of features to samples directly impacts model complexity and overfitting risk. In high-dimensional settings (e.g., p >> n), algorithms like linear regression may fail due to singular covariance matrices, while regularized methods (Ridge, Lasso) or tree-based models become necessary. This is a core consideration in the bias-variance tradeoff for regression problems.

Exam trap

AWS often tests the distinction between operational concerns (like training time or hardware) and core modeling factors, expecting candidates to recognize that irrelevant options (time of day, laptop color) are clear distractors while the three correct factors directly influence algorithm performance and business suitability.

477
MCQmedium

A company is using SageMaker built-in object detection algorithm to detect defects in manufacturing images. The model is trained on 10,000 labeled images and achieves 95% accuracy. However, in production, the model misclassifies many defective items as non-defective (false negatives). The business requires recall > 90% for the defect class. Which action should they take?

A.Use a different algorithm such as semantic segmentation
B.Adjust the decision threshold of the model to increase recall at the expense of precision
C.Use SageMaker's Automatic Model Tuning to find better hyperparameters
D.Retrain the model with more images of non-defective items
AnswerB

Lowering the threshold increases recall for the positive class.

Why this answer

Threshold tuning directly optimizes recall for a given class.

478
Multi-Selecthard

A company is deploying a machine learning model for fraud detection. The model outputs a probability score. The cost of false negatives is very high. Which TWO metrics should the company focus on optimizing?

Select 2 answers
A.Precision
B.False positive rate (FPR)
C.F1 score
D.Area under the ROC curve (AUC-ROC)
E.Recall
AnswersC, E

F1 = harmonic mean of precision and recall; optimizing F1 also improves recall.

Why this answer

Recall (true positive rate) measures ability to find positives; minimizing false negatives is optimizing recall. AUC-ROC summarizes overall performance but not specific to false negatives. Precision focuses on false positives.

FPR is about false positives. F1 balances precision and recall, but recall directly addresses false negatives.

479
MCQmedium

A team is deploying a real-time inference endpoint using Amazon SageMaker. The model is a large deep learning model that requires GPU for inference. The endpoint must handle variable traffic patterns with minimal latency. Which deployment strategy should the team use?

A.Deploy a single model endpoint with an auto-scaling policy.
B.Use a SageMaker multi-model endpoint with GPU instance type.
C.Deploy a serverless endpoint using SageMaker Serverless Inference.
D.Use SageMaker Batch Transform to process requests in batches.
AnswerB

Multi-model endpoints allow hosting multiple models on GPU instances, handling variable traffic efficiently.

Why this answer

B is correct because SageMaker multi-model endpoints (MMEs) allow multiple models to be hosted on a single GPU-backed endpoint, dynamically loading and unloading models from disk to GPU memory as needed. This reduces cost and cold-start latency compared to single-model endpoints, while still providing GPU acceleration for deep learning inference. MMEs are ideal for variable traffic patterns because they can scale horizontally and share GPU resources efficiently.

Exam trap

The trap here is that candidates often assume serverless inference (Option C) is suitable for GPU workloads, but AWS SageMaker Serverless Inference only supports CPU instances, making it incompatible with large deep learning models that require GPU acceleration.

How to eliminate wrong answers

Option A is wrong because a single model endpoint with auto-scaling can handle variable traffic but does not optimize GPU utilization for multiple models; it would require separate endpoints for each model, increasing cost and management overhead. Option C is wrong because SageMaker Serverless Inference does not support GPU instances; it uses CPU-based compute, which is unsuitable for large deep learning models requiring GPU acceleration. Option D is wrong because SageMaker Batch Transform is designed for offline, asynchronous batch processing, not real-time inference with minimal latency; it cannot handle variable traffic patterns dynamically.

480
MCQmedium

A data scientist is training a deep learning model on Amazon SageMaker using a custom Docker container. The training job fails with an error 'OutOfMemoryError: CUDA out of memory'. The instance type is ml.p3.2xlarge (8 GB GPU memory). The model has 50 million parameters. What is the most likely cause and solution?

A.The instance type is insufficient; switch to ml.p3.8xlarge
B.The batch size is too large; reduce batch size
C.Enable gradient checkpointing to reduce memory
D.The model uses FP32 precision; enable mixed precision training
AnswerD

Mixed precision (FP16) halves memory usage, fitting the model into 8 GB.

Why this answer

A model with 50 million parameters in FP32 precision requires approximately 200 MB per parameter (4 bytes each = 200 MB for 50M), plus additional memory for activations, gradients, and optimizer states, which can easily exceed the 8 GB GPU memory of ml.p3.2xlarge. Mixed precision training (FP16) halves the memory usage for tensors, reducing the overall footprint and often fitting the model within GPU limits. Option A (instance type) may solve the problem but is more expensive and unnecessary if mixed precision works.

Option B (batch size) is a contributing factor but not the most likely root cause, as even a batch size of 1 may still cause OOM due to parameter storage. Option C (gradient checkpointing) trades compute for memory by recomputing activations, but does not address the primary issue of parameter storage in FP32. Therefore, enabling mixed precision is the most direct and cost-effective solution.

481
MCQeasy

A data scientist is training a binary classification model using Amazon SageMaker. The dataset is highly imbalanced (99% negative class, 1% positive class). The model currently achieves 99% accuracy but fails to detect most positive cases. Which metric should the data scientist primarily use to evaluate model performance?

A.ROC AUC
B.F1 score
C.Recall
D.Accuracy
AnswerB

F1 score balances precision and recall, suitable for imbalanced data.

Why this answer

In highly imbalanced datasets (99% negative, 1% positive), accuracy is misleading because a model can achieve 99% accuracy by simply predicting the majority class for all instances, failing to detect any positive cases. The F1 score (option B) is the harmonic mean of precision and recall, providing a balanced measure that penalizes models that trade off recall for precision or vice versa. This makes it the primary metric for evaluating binary classification performance on imbalanced data, as it directly reflects the model's ability to correctly identify positive cases while minimizing false positives.

Exam trap

The trap here is that candidates see 99% accuracy and assume the model is performing well, failing to recognize that accuracy is meaningless on imbalanced datasets, and they may incorrectly choose ROC AUC because it is commonly used for binary classification without understanding its limitations with extreme class imbalance.

How to eliminate wrong answers

Option A (ROC AUC) is wrong because it measures the model's ability to rank positive instances higher than negative ones across all thresholds, which can be overly optimistic on highly imbalanced datasets and does not directly reflect precision or recall for the minority class. Option C (Recall) is wrong because while it captures the proportion of actual positives correctly identified, it ignores false positives, so a model could achieve high recall by predicting all instances as positive, which is not useful. Option D (Accuracy) is wrong because it is dominated by the majority class; a model that always predicts the negative class achieves 99% accuracy but fails entirely to detect positive cases, making it a poor metric for imbalanced classification.

482
MCQeasy

A machine learning team is using SageMaker to train a model with the built-in Linear Learner algorithm. The dataset has 1 million rows and 20 features. The training completes, but the model's mean squared error (MSE) is high. Which parameter adjustment is most likely to reduce MSE?

A.Increase the mini-batch size
B.Change the loss function to cross-entropy
C.Increase the number of epochs
D.Increase the learning rate
AnswerC

Increasing the number of epochs allows the model to see the data more times, helping it converge to a lower training error, thus reducing MSE.

Why this answer

Increasing the number of epochs allows the model to see the data more times, helping it converge to a lower training error, thus reducing MSE. Option A is incorrect: increasing mini-batch size typically improves computational efficiency but can make convergence slower per epoch, potentially requiring even more epochs to converge; it may not directly reduce MSE. Option B is incorrect: cross-entropy is a loss function for classification problems, not regression; Linear Learner with MSE is appropriate for regression.

Option D is incorrect: increasing the learning rate can cause the optimizer to overshoot the minimum or diverge, often increasing rather than decreasing MSE.

483
MCQhard

A machine learning team is using SageMaker to train a custom TensorFlow model on a dataset that fits in memory. The training job is taking too long. The team wants to reduce training time without changing the model architecture. Which approach is most effective?

A.Switch the input mode from File to Pipe
B.Use SageMaker managed spot training
C.Use Amazon EFS as the input data source instead of S3
D.Use a larger instance type with more vCPUs
AnswerA

Pipe mode streams data directly, reducing I/O wait time and speeding up training.

Why this answer

Switching the input mode from File to Pipe is the most effective approach because it streams data directly from Amazon S3 to the training container, eliminating the need to download the entire dataset to the local storage before training begins. This reduces the I/O bottleneck and significantly cuts down the time spent on data loading, especially for datasets that fit in memory, as the model can start training almost immediately while data is being streamed.

Exam trap

AWS often tests the misconception that larger instances always reduce training time, but the trap here is that the dataset fits in memory, so the bottleneck is typically I/O, not compute, making data streaming optimizations like Pipe mode more effective than scaling up hardware.

How to eliminate wrong answers

Option B is wrong because SageMaker managed spot training reduces cost by using spare EC2 capacity, but it does not inherently reduce training time; in fact, it can increase total time due to potential interruptions and checkpoint restarts. Option C is wrong because Amazon EFS as an input data source typically introduces higher latency and slower throughput compared to S3, and it does not support the Pipe input mode, so it would likely increase training time. Option D is wrong because using a larger instance type with more vCPUs may improve compute parallelism but does not address the data loading bottleneck that is the primary cause of slow training; the dataset fits in memory, so the issue is likely I/O-bound, not compute-bound.

484
MCQhard

Refer to the exhibit. An IAM policy is attached to a SageMaker notebook instance role. A data scientist is trying to train a model using the SageMaker built-in XGBoost algorithm with training data in 'my-bucket/training-data/' and expects output in 'my-bucket/output/'. The training job fails with an access denied error. What is the most likely missing permission?

A.iam:PassRole on the SageMaker execution role.
B.ecr:GetAuthorizationToken on the ECR repository.
C.s3:ListBucket on the S3 bucket.
D.sagemaker:DescribeTrainingJob on the training job.
AnswerA

The policy is missing iam:PassRole, which is required to allow SageMaker to assume the execution role for the training job.

Why this answer

The training job fails with 'access denied' because the IAM policy attached to the SageMaker notebook instance role does not include the `iam:PassRole` permission. SageMaker requires this permission to pass the execution role specified in the `CreateTrainingJob` API call. Without it, the API call is denied.

The other permissions (ECR, S3 list, DescribeTrainingJob) are either not needed at this stage or are already granted via the SageMaker service role, not the notebook role.

485
MCQmedium

A data scientist is training a gradient boosting model using SageMaker's built-in XGBoost algorithm. The model is overfitting on the training data. Which hyperparameter adjustment is most likely to reduce overfitting?

A.Increase learning rate (eta)
B.Increase max_depth
C.Increase num_round
D.Increase lambda (L2 regularization)
AnswerD

Higher lambda penalizes large weights, reducing overfitting.

Why this answer

Increasing the L2 regularization term (lambda) penalizes large weights, which helps reduce overfitting. Option A is incorrect because increasing the learning rate (eta) can cause the model to converge too quickly and may lead to overfitting if not paired with proper regularization. Option B is incorrect because increasing max_depth increases model complexity, which typically worsens overfitting.

Option C is incorrect because increasing num_round (number of boosting rounds) allows the model to fit the training data more closely, increasing the risk of overfitting.

486
MCQhard

A machine learning engineer is building a binary classification model to predict customer churn. The dataset is highly imbalanced (5% churn). The engineer wants to use Amazon SageMaker's built-in XGBoost algorithm. Which combination of hyperparameters is most appropriate for this scenario?

A.scale_pos_weight=19, subsample=0.8
B.scale_pos_weight=0.05, subsample=0.8
C.scale_pos_weight=19, subsample=1.0
D.scale_pos_weight=1, subsample=1.0
AnswerA

Correct ratio and subsample for regularization.

Why this answer

In a highly imbalanced dataset with only 5% churn, the ratio of negative to positive classes is 95:5, or 19:1. The `scale_pos_weight` hyperparameter in XGBoost should be set to this ratio (19) to penalize misclassifications of the minority class more heavily. A `subsample` of 0.8 introduces stochasticity and helps prevent overfitting, which is especially important when the minority class is small.

Exam trap

The trap here is that candidates often confuse `scale_pos_weight` with a simple class weight or mistakenly think a value less than 1 is needed for the minority class, when in fact it should be the ratio of majority to minority class counts.

How to eliminate wrong answers

Option B is wrong because `scale_pos_weight=0.05` would actually down-weight the minority class, making the model ignore churn cases entirely. Option C is wrong because `subsample=1.0` uses the full dataset for every tree, which increases the risk of overfitting on the minority class without any regularization from row sampling. Option D is wrong because `scale_pos_weight=1` treats both classes equally, failing to address the 19:1 class imbalance, and `subsample=1.0` again provides no overfitting protection.

487
MCQmedium

A company uses SageMaker to deploy a real-time inference endpoint for a fraud detection model. The model is an XGBoost model trained on 50 features. The endpoint receives 100 requests per second, but latency is higher than the required 200 ms. The team wants to reduce latency without retraining. What should they do?

A.Increase the number of instances behind the endpoint
B.Use SageMaker's batch transform instead of real-time endpoint
C.Reduce the number of features by selecting the most important ones
D.Use SageMaker's Elastic Inference to attach an acceleration to the endpoint
AnswerC

Reducing to the most important features directly reduces model complexity and inference time without retraining. Correct.

Why this answer

To reduce inference latency without retraining the XGBoost model, reducing the number of features to the most important ones directly decreases the computational complexity of the model, as fewer tree splits are evaluated per request. This is a model-level optimization that does not require retraining if the feature importance is already known. SageMaker Elastic Inference, however, is designed to accelerate deep learning models by attaching a GPU accelerator; it does not speed up XGBoost or other tree-based models because they do not utilize GPUs effectively.

Therefore, only option C is correct.

Exam trap

The trap is that candidates may assume Elastic Inference works for any model type, but it is specifically for deep learning. They might also overlook that retraining is not required for feature selection if importance is already established.

How to eliminate wrong answers

Option A is wrong because increasing the number of instances behind the endpoint distributes the request load but does not reduce per-request latency; it primarily improves throughput and can even add network overhead. Option B is wrong because SageMaker's batch transform is designed for offline, asynchronous processing of large datasets, not for real-time inference with a 200 ms latency requirement; switching to batch transform would break the real-time use case entirely.

488
MCQhard

A machine learning engineer is deploying a PyTorch model to SageMaker. The model requires custom inference logic. Which approach should the engineer use?

A.Use a SageMaker built-in PyTorch container as-is
B.Use SageMaker Ground Truth to deploy the model
C.Use SageMaker Processing to run inference
D.Create a custom inference script and use the SageMaker PyTorch container
AnswerD

Creating a custom inference script and using the SageMaker PyTorch container allows you to define custom processing logic for inference.

Why this answer

SageMaker allows you to provide a custom inference script (entry point) when using the PyTorch container, enabling custom inference logic. Option A is wrong because the built-in container as-is would not incorporate custom logic. Option B is wrong because SageMaker Ground Truth is for labeling, not model deployment.

Option C is wrong because SageMaker Processing is for data processing, not inference.

489
MCQmedium

Refer to the exhibit. A data scientist runs the above CLI command to create a SageMaker training job. The job fails with an error 'Unable to read data from s3://bucket/train/'. What is the MOST likely cause?

A.The training image is not accessible
B.The instance type does not support the required memory
C.The IAM role does not have permissions to read from the S3 bucket
D.The training job is in a different region than the S3 bucket
AnswerC

The role must have s3:GetObject permission for the training data.

Why this answer

The error 'Unable to read data from s3://bucket/train/' indicates that the SageMaker training job cannot access the S3 input data. The most common cause is that the IAM role specified in the command does not have the necessary s3:GetObject permission on the S3 bucket or objects. SageMaker uses the IAM role to assume permissions for reading training data, and without proper S3 read access, the job fails at the data loading stage.

Exam trap

The trap here is that candidates may confuse the error message with a network or region issue, but the 'Unable to read data' error is almost always an IAM permissions problem, not a connectivity or resource constraint issue.

How to eliminate wrong answers

Option A is wrong because if the training image were not accessible, the error would typically be 'Unable to pull image' or 'Image not found', not a data read error from S3. Option B is wrong because insufficient memory would cause an out-of-memory or resource-exhausted error, not a failure to read data from S3. Option D is wrong because SageMaker automatically handles cross-region S3 access by copying data to the training job's region; a region mismatch would not produce an 'Unable to read data' error unless the bucket policy explicitly denies cross-region access, which is not the default behavior.

490
MCQhard

A data scientist is using Amazon SageMaker to train a custom TensorFlow model. The training job is failing with the error: 'OutOfRangeError: End of sequence'. The input data is stored in TFRecord format in S3. What is the most likely cause?

A.The TFRecord files are corrupted.
B.The number of training steps or epochs specified exceeds the dataset size.
C.The instance type does not have enough memory.
D.The shuffle buffer size is too large.
AnswerB

The training loop continues beyond available data, causing the error.

Why this answer

The 'OutOfRangeError: End of sequence' error in TensorFlow occurs when the training loop attempts to read more data than is available in the dataset. This typically happens when the number of training steps or epochs specified exceeds the total number of records in the TFRecord files, causing the iterator to reach the end of the dataset prematurely.

Exam trap

The trap here is that candidates often confuse 'OutOfRangeError' with data corruption or memory issues, but the error specifically indicates the dataset has been fully iterated, not that the data is damaged or resources are insufficient.

How to eliminate wrong answers

Option A is wrong because corrupted TFRecord files would typically cause parsing errors (e.g., 'DataLossError' or 'InvalidArgumentError'), not an 'End of sequence' error which indicates the iterator has exhausted valid data. Option C is wrong because insufficient memory would manifest as an 'OutOfMemoryError' or a resource exhaustion error, not a dataset iteration boundary error. Option D is wrong because a large shuffle buffer size may increase memory usage but does not cause an 'End of sequence' error; it only affects the randomness of data ordering within the available dataset.

491
Multi-Selecthard

A data scientist is using Amazon SageMaker to train a deep learning model. The training job is taking too long. Which THREE actions can reduce training time?

Select 3 answers
A.Use incremental training to continue from a previous model
B.Use Spot Instances to reduce cost
C.Use Pipe input mode to stream data directly from Amazon S3
D.Decrease the batch size to reduce memory usage
E.Use a GPU instance type for faster computation
AnswersA, C, E

Incremental training starts from an existing model, requiring fewer epochs.

Why this answer

Incremental training allows you to start from a previously trained model, which reduces training time because the model does not need to learn from scratch. SageMaker's incremental training loads the existing model artifacts and continues training on new data, significantly cutting down the time required to converge compared to full retraining.

Exam trap

The trap here is that candidates often confuse cost-saving techniques (like Spot Instances) with performance-improving techniques, or they mistakenly think decreasing batch size always speeds up training, when in fact it can slow it down due to increased overhead.

492
Multi-Selectmedium

A data scientist is building a deep learning model using Amazon SageMaker. The model is overfitting the training data. Which THREE actions can help reduce overfitting?

Select 3 answers
A.Add L2 regularization to the loss function.
B.Use data augmentation to increase the training dataset size.
C.Increase the number of layers in the network.
D.Reduce the learning rate.
E.Use dropout layers in the network.
AnswersA, B, E

L2 regularization penalizes large weights, reducing overfitting.

Why this answer

Overfitting can be reduced by regularization techniques such as L2 regularization (Option A) which penalizes large weights, by dropout (Option E) which randomly ignores neurons during training, and by data augmentation (Option B) which increases the effective size of the training dataset by creating modified copies. Increasing model complexity by adding layers (Option C) would worsen overfitting, and reducing the learning rate (Option D) does not directly address overfitting—it affects convergence speed.

493
MCQmedium

A team is deploying a SageMaker endpoint for a model that was trained with scikit-learn. The endpoint receives spikes in traffic during business hours. The team wants to minimize cost while ensuring availability during spikes. Which endpoint configuration is MOST appropriate?

A.Use SageMaker Serverless Inference
B.Use a production variant endpoint with auto-scaling based on CPU utilization
C.Use a multi-model endpoint with a single instance type
D.Deploy a single large instance that can handle peak load
AnswerB

Auto-scaling handles traffic spikes efficiently.

Why this answer

A production variant endpoint with auto-scaling based on CPU utilization allows the SageMaker endpoint to dynamically adjust the number of instances in response to traffic spikes, ensuring availability during business hours while minimizing cost by scaling down during off-peak periods. This approach is ideal for a scikit-learn model, which is CPU-bound, making CPU utilization a relevant and effective scaling metric.

Exam trap

The trap here is that candidates often confuse serverless inference with cost optimization for predictable spikes, overlooking that auto-scaling with a relevant metric like CPU utilization provides both cost efficiency and availability for scheduled traffic patterns.

How to eliminate wrong answers

Option A is wrong because SageMaker Serverless Inference is designed for intermittent or unpredictable traffic patterns with low latency requirements, but it can incur cold start latency and is not optimal for consistent daily spikes during business hours, potentially leading to higher costs or performance issues. Option C is wrong because a multi-model endpoint with a single instance type does not provide auto-scaling; it hosts multiple models on a single instance, which cannot handle traffic spikes by itself and would still require scaling mechanisms to ensure availability. Option D is wrong because deploying a single large instance that can handle peak load results in over-provisioning and higher costs during off-peak hours, as the instance remains fully running regardless of actual traffic, contradicting the goal of minimizing cost.

494
Multi-Selecteasy

Which TWO of the following are examples of unsupervised learning tasks?

Select 2 answers
A.Classifying emails as spam or not spam
B.Dimensionality reduction using PCA
C.Sentiment analysis of product reviews
D.Clustering customer segments
E.Predicting house prices
AnswersB, D

PCA reduces features without labels.

Why this answer

Principal Component Analysis (PCA) is an unsupervised learning technique used for dimensionality reduction. It works by identifying the directions (principal components) that maximize variance in the data, without requiring any labeled target variable. This makes it a classic example of unsupervised learning, as the algorithm learns patterns solely from the input features.

Exam trap

The MLS-C01 exam often tests the distinction between supervised and unsupervised learning by presenting tasks that seem intuitive (like clustering) but pairing them with tasks that require labeled outputs (like classification or regression), so candidates must recognize that any task involving a target variable is supervised.

495
MCQmedium

A company is building a recommender system using matrix factorization. The dataset contains user-item interactions. The model is trained on a large dataset, but the recommendations for new users are poor. Which approach would MOST effectively address this cold-start problem?

A.Incorporate user demographic features as side information
B.Switch to item-based collaborative filtering only
C.Increase the number of latent factors in the model
D.Use only implicit feedback signals for training
AnswerA

Side information helps generalize to new users by leveraging metadata.

Why this answer

Matrix factorization models learn latent factors only from user-item interactions. For new users with no history, the model cannot compute a meaningful latent vector, leading to poor recommendations. Incorporating user demographic features as side information allows the model to initialize or infer latent factors for new users based on their attributes, directly addressing the cold-start problem.

Exam trap

The trap here is that candidates may think increasing latent factors or switching to implicit feedback improves generalization, but neither addresses the fundamental lack of user interaction data for new users.

How to eliminate wrong answers

Option B is wrong because switching to item-based collaborative filtering still relies on user-item interactions and does not solve the cold-start problem for new users with no history. Option C is wrong because increasing the number of latent factors may improve model capacity but does not provide any information about new users, so it cannot mitigate the cold-start issue. Option D is wrong because using only implicit feedback signals does not introduce any new user attributes; it still requires historical interactions to generate recommendations, leaving the cold-start problem unresolved.

496
MCQmedium

A data scientist is training a neural network on image data using TensorFlow with GPU instances on SageMaker. The training is slow because the GPU utilization is low. The data pipeline uses tf.data with a large number of preprocessing operations. Which action would most likely increase GPU utilization?

A.Increase the learning rate to converge faster.
B.Increase the prefetch buffer size in the tf.data pipeline.
C.Reduce the batch size to speed up each step.
D.Increase the number of CPU instances in the training job.
E.Use smaller image sizes to reduce computation.
AnswerB

Prefetching overlaps CPU data preparation with GPU computation, improving GPU utilization.

Why this answer

Increasing the prefetch buffer size in the tf.data pipeline allows the CPU to prepare batches in advance while the GPU is computing, reducing idle time and improving GPU utilization. Option A (increase learning rate) does not affect data throughput. Option C (reduce batch size) can decrease utilization as it reduces the amount of work per GPU step.

Option D (increase number of CPU instances) addresses CPU capacity but the bottleneck is often data pipeline, not CPU count; increasing instances may not help. Option E (use smaller images) reduces computation per image but may not improve utilization percentage if the pipeline is the bottleneck.

497
MCQmedium

Refer to the exhibit. A data scientist is using Amazon SageMaker Ground Truth to label a dataset. The output manifest file references S3 objects with metadata. The scientist notices that a training job using the labeled data yields poor accuracy. What is the most likely issue?

A.The labeled dataset has missing labels for some records.
B.The training data is in an incorrect format for the algorithm.
C.The IAM role used for training does not have permissions to read the manifest file.
D.The data distribution differs significantly between the training set and the real-world inference data.
AnswerB

If the data format does not match the algorithm's expectations, training may complete but produce poor results.

Why this answer

The poor accuracy is most likely due to the training data being in an incorrect format for the algorithm. Amazon SageMaker Ground Truth outputs a manifest file with metadata, but the source S3 objects may be in a format (e.g., raw images, text files) that is not directly compatible with the chosen built-in algorithm or custom model. For example, if the algorithm expects RecordIO-encoded data or a specific CSV structure, but the manifest points to raw JPEG images, the training job will still run (no failure) but produce poor results.

Other options: missing labels or IAM issues would typically cause job failures, not just poor accuracy; data distribution shift is possible but less directly indicated by the exhibit.

498
MCQhard

A data scientist is training a neural network for a multi-class classification problem with 100 classes. The model uses a softmax output layer and cross-entropy loss. During training, the loss decreases steadily but the accuracy on the validation set plateaus early. Which of the following is the most likely cause?

A.Batch size is too large
B.The model is overfitting the training data
C.Number of epochs is too small
D.Learning rate is too high
AnswerB

Overfitting occurs when the model learns training data noise, causing training loss to keep decreasing while validation performance stagnates.

Why this answer

When the validation accuracy plateaus early while training loss continues to decrease, it indicates that the model is memorizing the training data rather than learning generalizable patterns. This is classic overfitting, where the softmax output layer produces high-confidence predictions for training samples but fails to generalize to unseen validation data, causing cross-entropy loss to drop on the training set while validation accuracy stagnates.

Exam trap

AWS often tests the distinction between overfitting and underfitting by pairing a decreasing training loss with a plateauing validation metric, tricking candidates into choosing learning rate or epoch issues when the real problem is memorization.

How to eliminate wrong answers

Option A is wrong because a batch size that is too large typically leads to slower convergence or poorer generalization, not a plateau in validation accuracy while training loss decreases; it would more likely cause both losses to be high or unstable. Option C is wrong because too few epochs would cause both training and validation accuracy to be low and still improving, not a plateau in validation accuracy alone. Option D is wrong because a learning rate that is too high usually causes the loss to diverge or oscillate, not a steady decrease in training loss with a plateau in validation accuracy.

499
MCQhard

A machine learning engineer is deploying a model that predicts loan defaults. The model uses features like income, credit score, and debt-to-income ratio. After deployment, the model's performance degrades over time. Which concept best describes this phenomenon?

A.Data drift
B.Concept drift
C.Overfitting
D.Model drift
AnswerD

Model drift is the degradation of model performance over time.

Why this answer

Model drift is the correct answer because it is the general term for degradation in model performance over time, often caused by changes in data distributions or relationships between features and the target. This phenomenon includes both data drift (changes in input distribution) and concept drift (changes in the relationship between inputs and the target). Option A (Data drift) is a specific type of model drift focusing on input features, not the overall degradation.

Option B (Concept drift) is another specific type concerning the target relationship. Option C (Overfitting) is a training-time issue where the model fits noise, not a time-dependent degradation after deployment.

500
MCQeasy

A company is using Amazon SageMaker to train a linear regression model. The data scientist notices that the training loss is decreasing but the validation loss has started to increase after a few epochs. What is the most likely cause?

A.The model is underfitting the training data.
B.There is data leakage from the validation set into the training set.
C.The model is overfitting the training data.
D.The learning rate is too high.
AnswerC

Decreasing training loss with increasing validation loss is a classic sign of overfitting.

Why this answer

When training loss decreases but validation loss increases, the model is overfitting to the training data. This is a classic sign of overfitting. Underfitting would show both losses high.

Learning rate too high would cause divergence. Data leakage would cause both losses to be artificially low.

501
MCQhard

A company uses Amazon SageMaker to host a model for real-time inference. The model is a large ensemble that takes 2 seconds to load into memory. To reduce cold start latency, the data scientist uses SageMaker's managed warm pools. However, they notice that during a sudden traffic spike, new instances still experience high latency. What is the BEST way to ensure consistently low latency for all requests?

A.Use a larger instance type to reduce model loading time.
B.Configure auto scaling based on the number of active invocations to maintain a buffer of warmed instances.
C.Reduce the number of instances to minimize cold start frequency.
D.Switch to SageMaker Serverless Inference.
AnswerB

Auto scaling with a buffer ensures that new instances are provisioned ahead of demand, reducing cold start impact.

Why this answer

Configuring auto scaling based on the number of active invocations maintains a buffer of warmed instances. This ensures that when traffic spikes occur, new instances are already loaded and ready to serve requests, avoiding cold start latency. Option A is wrong because using a larger instance type does not eliminate cold starts; the model still needs to load into memory.

Option C is wrong because reducing instances increases the frequency of cold starts. Option D is wrong because SageMaker Serverless Inference has its own cold start overhead and is not suitable for workloads requiring consistently low latency.

502
MCQeasy

A retail company uses Amazon SageMaker to train a model for product demand forecasting. The dataset contains daily sales data for 10,000 products over 3 years. The data includes features like price, promotions, holidays, and seasonality. The data scientist uses a linear regression model and gets an RMSE of 50 units. However, the business requires more accurate forecasts, especially for products with high variability. The scientist notices that the residuals show a pattern: the model underestimates demand during promotional periods. Which approach should the scientist take to improve the model?

A.Add interaction features between promotion and other variables.
B.Collect more historical data for training.
C.Use a deep learning model like LSTM.
D.Remove promotion features to simplify the model.
AnswerA

Interaction terms capture combined effects.

Why this answer

Adding interaction features between promotion and other variables allows the model to capture the specific effect of promotions on demand, which the linear regression currently underestimates. Option B (more data) may help but won't directly address the structural bias; Option C (LSTM) might be overkill and not directly solve the underestimation during promotions; Option D (removing promotion features) would worsen the problem by discarding valuable information.

503
MCQeasy

A data scientist is training a binary classification model on a highly imbalanced dataset (99% negative class, 1% positive class). The model currently achieves 99% accuracy but only identifies 0.5% of true positives. Which metric should the data scientist focus on to improve model performance?

A.Precision
B.Root Mean Squared Error (RMSE)
C.Recall
D.Accuracy
AnswerC

Recall measures the ability to find all positive samples, which is crucial for imbalanced data.

Why this answer

Recall (sensitivity) measures the proportion of actual positives correctly identified, which is critical when the dataset is highly imbalanced (99% negative, 1% positive) and the model fails to detect most positives (only 0.5% true positives). Improving recall directly addresses the model's inability to capture the minority class, even if it reduces precision or accuracy. In binary classification with severe class imbalance, accuracy is misleading because a model can achieve 99% accuracy by simply predicting the majority class, as seen here.

Exam trap

The trap here is that candidates see 99% accuracy and assume the model is performing well, failing to recognize that accuracy is a deceptive metric in imbalanced datasets, while recall directly measures the model's ability to find the rare positive class.

How to eliminate wrong answers

Option A is wrong because precision focuses on the proportion of predicted positives that are actually positive, which does not address the low true positive rate (0.5%); improving precision could even further reduce recall by making the model more conservative. Option B is wrong because Root Mean Squared Error (RMSE) is a regression metric that measures the average magnitude of errors in continuous predictions, not applicable to binary classification outcomes like true positive identification. Option D is wrong because accuracy is already 99% and is a poor metric for imbalanced datasets; optimizing for accuracy encourages the model to predict the majority class (negative) for all instances, which is exactly why only 0.5% of positives are found.

504
MCQhard

A data scientist is setting up a SageMaker training job and has attached this IAM policy to the execution role. The training job fails with an access denied error when trying to write to the output path 's3://my-bucket/output/model.tar.gz'. What additional permission is needed?

A.s3:ListBucket
B.s3:GetObject for the output path
C.s3:DeleteObject
D.iam:PassRole on the role itself
AnswerA

SageMaker requires ListBucket permission to access the bucket.

Why this answer

The training job fails because SageMaker needs to verify that the output S3 bucket exists before writing to it. The s3:ListBucket permission is required to list the contents of the bucket (or confirm its existence) as part of the write operation. Without this permission, the service cannot validate the bucket, resulting in an access denied error even if s3:PutObject is allowed.

Exam trap

The trap here is that candidates assume only s3:PutObject is needed for writing to S3, but AWS services like SageMaker often require s3:ListBucket to verify the bucket exists before performing write operations.

How to eliminate wrong answers

Option B is wrong because s3:GetObject is a read permission used for retrieving objects, not for writing output; the training job needs write access (s3:PutObject) to create the model artifact. Option C is wrong because s3:DeleteObject is unrelated to writing output; it is used for removing objects, and the training job does not need to delete anything. Option D is wrong because iam:PassRole is required to pass the execution role to the SageMaker service, but the question states the role is already attached to the training job, so this permission is not missing; the error occurs specifically at the S3 write step.

505
MCQeasy

A machine learning engineer is using Amazon SageMaker to deploy a model for real-time inference. The model must respond within 100 milliseconds. The initial deployment uses a single ml.m5.large instance, but latency is too high. Which change should the engineer make to reduce latency?

A.Switch to a compute-optimized instance like ml.c5.2xlarge.
B.Use batch transform instead of real-time endpoint.
C.Deploy to a single ml.t2.medium instance to reduce cost.
D.Deploy the model on a multi-model endpoint.
AnswerA

Compute-optimized instances provide higher CPU performance, reducing prediction latency.

Why this answer

A compute-optimized instance like ml.c5.2xlarge provides more CPU and memory, reducing inference latency. Option B is wrong because batch transform is for offline predictions, not real-time; it does not reduce latency for real-time inference. Option C is wrong because using a smaller instance (ml.t2.medium) reduces resources and would likely increase latency, not reduce it.

Option D is wrong because multi-model endpoints share resources among models and can lead to contention, potentially increasing latency.

506
MCQmedium

A company is building a binary classifier to detect fraudulent transactions. The dataset is highly imbalanced (99% legitimate, 1% fraudulent). Which metric is most appropriate for evaluating the model?

A.Accuracy
B.Mean Squared Error
C.F1-score
D.Area Under the ROC Curve (AUC-ROC)
AnswerC

F1-score considers both precision and recall, suitable for imbalanced data.

Why this answer

Precision and recall (or F1-score) are more informative for imbalanced datasets than accuracy, because a model predicting all legitimate would achieve 99% accuracy but be useless. F1-score balances precision and recall.

507
Multi-Selecteasy

A company is using Amazon SageMaker to train a model. Which TWO metrics should be used to evaluate a binary classification model?

Select 2 answers
A.Accuracy
B.Perplexity
C.AUC
D.F1 score
E.Mean Absolute Error
AnswersC, D

AUC is a standard metric for binary classification.

Why this answer

AUC (Area Under the ROC Curve) is a threshold-independent metric that measures the model's ability to distinguish between positive and negative classes across all classification thresholds. For binary classification in SageMaker, AUC is robust to class imbalance and provides a single scalar value representing overall model performance, making it a standard evaluation metric.

Exam trap

The trap here is that candidates often pick Accuracy (A) as a default metric without considering class imbalance, or confuse regression metrics like MAE (E) with classification evaluation, while perplexity (B) is a distractor from NLP contexts.

508
MCQeasy

A machine learning engineer is deploying a model to Amazon SageMaker for real-time inference. The model requires low latency and must handle variable traffic patterns. Which SageMaker feature should the engineer use to automatically scale the number of instances based on demand?

A.SageMaker automatic scaling
B.Amazon EC2 Auto Scaling
C.Elastic Inference
D.SageMaker Batch Transform
AnswerA

SageMaker integrates with Application Auto Scaling to scale the number of instances based on demand.

Why this answer

SageMaker automatic scaling (Application Auto Scaling) is the correct feature because it allows the engineer to define scaling policies (e.g., based on CPU utilization or request latency) that automatically adjust the number of instances behind a SageMaker endpoint in response to real-time traffic patterns. This ensures low latency by maintaining sufficient capacity during spikes and reducing costs during lulls, without manual intervention.

Exam trap

The trap here is that candidates confuse Amazon EC2 Auto Scaling (which scales EC2 instances in an Auto Scaling group) with SageMaker automatic scaling (which scales SageMaker endpoint instances via Application Auto Scaling), leading them to pick B even though it does not directly apply to SageMaker endpoints.

How to eliminate wrong answers

Option B (Amazon EC2 Auto Scaling) is wrong because it operates at the EC2 instance level, not at the SageMaker endpoint level; SageMaker endpoints are managed services that require Application Auto Scaling with a specific SageMaker scalable target (e.g., variant.DesiredInstanceCount). Option C (Elastic Inference) is wrong because it accelerates inference by attaching a GPU accelerator to an instance, but it does not handle scaling of instances based on demand—it only reduces latency for deep learning models. Option D (SageMaker Batch Transform) is wrong because it is designed for offline, asynchronous batch predictions on large datasets, not for real-time inference with variable traffic patterns.

509
Multi-Selecthard

A company is deploying a machine learning model using Amazon SageMaker. The model requires GPUs for inference. Which THREE configurations can the company use to meet this requirement? (Choose THREE.)

Select 3 answers
A.SageMaker Serverless Inference
B.Real-time endpoints with ml.p3 instance types
C.SageMaker Batch Transform with ml.p3 instances
D.SageMaker Studio
E.SageMaker Elastic Inference (EI)
AnswersB, C, E

Real-time endpoints with ml.p3 instance types provide full GPU support for inference.

Why this answer

Real-time endpoints (option B) support GPU instances like ml.p3. Batch Transform (option C) also supports GPU instances. Elastic Inference (option E) provides GPU acceleration without a full GPU instance.

Option A (SageMaker Serverless Inference) does not support GPU. Option D (SageMaker Studio) is an IDE, not an inference option.

510
MCQhard

Refer to the exhibit. The training job 'my-job' failed with the error 'Unable to pull image from ECR'. What is the most likely cause?

A.The IAM role does not have permission to pull images from the ECR repository.
B.The instance type ml.m5.large does not support custom images.
C.The S3 bucket for training data is in a different account.
D.The role ARN is incorrect.
AnswerA

Without ecr:GetDownloadUrlForLayer and BatchGetImage, the pull fails.

Why this answer

The error 'Unable to pull image from ECR' indicates that the SageMaker training job could not retrieve the custom Docker image stored in Amazon ECR. The most likely cause is that the IAM role associated with the training job lacks the `ecr:GetDownloadUrlForLayer` and `ecr:BatchGetImage` permissions required to pull images from the ECR repository. Without these permissions, SageMaker cannot authenticate and download the container image, even if the repository and image exist.

Exam trap

The MLS-C01 exam often tests the misconception that any IAM role with basic SageMaker permissions can pull images from ECR, but the trap here is that the role must have explicit ECR permissions (not just SageMaker permissions) to download the container image, and candidates may incorrectly blame the instance type or S3 bucket location instead.

How to eliminate wrong answers

Option B is wrong because the instance type ml.m5.large fully supports custom images; SageMaker allows custom Docker images on any supported instance type, including ml.m5.large, as long as the image is compatible with the instance architecture. Option C is wrong because the S3 bucket being in a different account would cause a different error (e.g., 'Access Denied' or 'Bucket not found') and would not affect the ability to pull an image from ECR, which is a separate service. Option D is wrong because an incorrect role ARN would result in a validation error when submitting the job (e.g., 'Invalid IAM Role ARN'), not a runtime error during image pull; the job would fail to start, not fail mid-execution with an ECR pull error.

511
Multi-Selecthard

A company uses a SageMaker endpoint for real-time inference. They need to ensure high availability during deployment updates. Which THREE steps achieve this? (Choose 3)

Select 3 answers
A.Use a single instance to save costs
B.Use blue/green deployment with a new endpoint configuration
C.Configure multiple instances behind the endpoint
D.Delete the old endpoint before creating the new one
E.Use Canary or Linear traffic shifting in SageMaker
AnswersB, C, E

Blue/green allows traffic switch after new version is healthy.

Why this answer

Blue/green deployment, multiple instances, and traffic shifting are standard practices for zero-downtime updates.

512
Multi-Selectmedium

Which THREE evaluation metrics are appropriate for a multi-class classification problem? (Choose 3.)

Select 3 answers
A.Confusion matrix.
B.Accuracy.
C.Mean squared error.
D.Precision-recall curve.
E.F1 score (macro/micro).
AnswersA, B, E

Confusion matrix provides per-class performance.

Why this answer

Confusion matrix (A) is appropriate because it provides per-class performance metrics (TP, FP, FN, TN) for each class, which is essential for multi-class evaluation. Accuracy (B) is appropriate as it measures overall correctness across all classes, a common and intuitive metric for multi-class problems. F1 score with macro or micro averaging (E) is appropriate because macro averaging computes F1 per class and averages them equally, while micro averaging aggregates contributions across all classes, both suitable for multi-class.

Mean squared error (C) is incorrect; it is a regression metric not used for classification. Precision-recall curve (D) is typically used for binary classification, not standard for multi-class without extensions.

513
MCQmedium

A data scientist is deploying a SageMaker model using CloudFormation. The stack creation fails with the above error. What is the MOST likely cause?

A.The Docker image has not been pushed to the ECR repository
B.The IAM role does not have permissions to access ECR
C.The model name is incorrect
D.The instance type specified in the endpoint configuration is not available
AnswerA

The error clearly states the image does not exist in ECR.

Why this answer

The error indicates that SageMaker cannot find the Docker image specified in the `PrimaryContainer` of the model definition. CloudFormation creates the SageMaker model by referencing an ECR image URI; if that image has not been pushed to the specified ECR repository, the model creation fails immediately. This is the most common cause when the stack creation fails with an error about a missing or inaccessible image.

Exam trap

The trap here is that candidates confuse a missing image (resource not found) with an IAM permissions error, but the error message for a missing image is distinct and occurs at a different stage of the API call.

How to eliminate wrong answers

Option B is wrong because an IAM role lacking ECR permissions would produce an access denied or authorization error, not a 'not found' error for the image. Option C is wrong because an incorrect model name would cause a different error (e.g., 'Model not found') only when referencing an existing model, not during creation. Option D is wrong because an unavailable instance type would cause a resource allocation failure at the endpoint creation step, not during model creation.

514
MCQeasy

A CloudFormation stack creation failed. The SageMaker endpoint resource shows CREATE_FAILED. What is the most likely issue?

A.The IAM role used by CloudFormation lacks permissions to create endpoints.
B.The S3 bucket 'my-bucket' does not contain the object 'model.tar.gz'.
C.The SageMaker endpoint configuration is invalid.
D.The instance type specified for the endpoint is not available in the region.
AnswerB

The error states the model data is not accessible, likely because the object does not exist.

Why this answer

A CREATE_FAILED status on a SageMaker endpoint resource during CloudFormation stack creation most commonly indicates that the model artifact specified in the Model definition cannot be located. SageMaker requires the S3 bucket and object path (e.g., 's3://my-bucket/model.tar.gz') to exist and be accessible at the time of model creation. If the object is missing, the model resource fails, cascading to the endpoint creation failure.

Exam trap

The trap here is that candidates often assume endpoint failures are always due to configuration or permissions, but the most common root cause in CloudFormation deployments is a missing S3 artifact, which is a prerequisite that is easy to overlook.

How to eliminate wrong answers

Option A is wrong because if the IAM role lacked permissions, CloudFormation would typically fail with an access denied error on the role itself, not specifically on the endpoint resource with CREATE_FAILED; the role is validated before resource creation. Option C is wrong because an invalid endpoint configuration would produce a validation error during stack creation, but the question states the endpoint resource shows CREATE_FAILED, which implies the configuration was accepted but the underlying model or instance caused failure. Option D is wrong because an unavailable instance type would result in a resource creation error with a specific message about insufficient capacity or unavailability, not a generic CREATE_FAILED on the endpoint; CloudFormation would report a different error code.

515
MCQeasy

A machine learning team is using Amazon SageMaker to train a linear regression model. The team notices that the training loss decreases rapidly initially but then plateaus at a high value. What is the MOST likely cause?

A.The model uses batch normalization
B.The learning rate is set too low
C.The model is over-regularized with L2 regularization
D.The learning rate is set too high
AnswerD

A high learning rate can cause the loss to fluctuate or plateau after an initial drop.

Why this answer

A learning rate set too high causes the optimizer to take excessively large steps, overshooting the minimum of the loss function. This results in rapid initial decrease as the model makes large corrections, but then the loss plateaus at a high value because the parameters oscillate around the optimum without converging. In SageMaker's linear regression (typically using stochastic gradient descent), a high learning rate prevents fine-grained convergence, leading to a high plateau.

Exam trap

The trap here is that candidates often associate a plateau in loss with a learning rate that is too low (underfitting), but the rapid initial decrease followed by a high plateau is a classic sign of a learning rate that is too high, causing divergence or oscillation.

How to eliminate wrong answers

Option A is wrong because batch normalization is not typically used in linear regression models; it is a technique for deep neural networks to stabilize training by normalizing layer inputs, and it would not cause a high plateau. Option B is wrong because a learning rate set too low would cause the loss to decrease very slowly from the start, not rapidly initially and then plateau at a high value. Option C is wrong because over-regularization with L2 regularization would cause the loss to be high from the beginning due to large penalty terms, and the loss would not decrease rapidly initially; it would remain high throughout training.

516
MCQhard

A company is deploying a model that predicts customer churn. The model's recall for the churn class is 0.9, but precision is 0.4. The business cost of false positives is high. Which strategy would MOST likely improve precision without significantly harming recall?

A.Collect more data for the churn class
B.Use a different algorithm such as Random Forest
C.Decrease the decision threshold for the churn class
D.Increase the decision threshold for the churn class
AnswerD

Higher threshold reduces false positives, improving precision, though recall may drop slightly.

Why this answer

Adjusting the decision threshold to require a higher probability before predicting churn can reduce false positives (increase precision) but may lower recall. The goal is to find a threshold that balances both. Using more aggressive regularization or different algorithms may not directly control the trade-off.

517
MCQhard

A data scientist is building a multi-class classification model with 10 classes. The dataset has 100,000 samples. After training a random forest with 100 trees, the model achieves 85% accuracy on the test set. However, the data scientist notices that for one rare class (1% of data), recall is only 5%. Which technique is MOST likely to improve recall for the rare class without significantly reducing overall accuracy?

A.Increase the number of trees to 500
B.Apply SMOTE to oversample the rare class in the training data
C.Use stratified sampling only for the test set
D.Reduce the decision threshold for the rare class to 0.1
AnswerB

SMOTE creates synthetic samples for the minority class.

Why this answer

SMOTE (Synthetic Minority Oversampling Technique) generates synthetic samples for the rare class by interpolating between existing minority instances, which directly addresses the class imbalance. This increases the model's exposure to the rare class during training, improving recall without discarding data or significantly altering the overall class distribution, thus preserving overall accuracy.

Exam trap

The MLS-C01 exam often tests the misconception that increasing model complexity (more trees) or adjusting thresholds post-training can fix class imbalance, when in fact the root cause is the skewed training data distribution, which requires a data-level technique like SMOTE.

How to eliminate wrong answers

Option A is wrong because increasing the number of trees in a random forest primarily reduces variance and improves generalization, but it does not address class imbalance; recall for a rare class will remain low if the training data is skewed. Option C is wrong because stratified sampling on the test set only ensures the test set reflects the original class distribution, which does nothing to improve the model's ability to learn the rare class during training. Option D is wrong because reducing the decision threshold for the rare class to 0.1 would increase recall but at the cost of dramatically increasing false positives, which would significantly reduce overall accuracy, especially since the rare class is only 1% of the data.

518
MCQeasy

A data scientist is building a binary classification model to predict whether a customer will subscribe to a service. The dataset contains 20 features, including categorical variables with high cardinality (e.g., zip code with 10,000 unique values). The scientist uses a logistic regression model and obtains a training AUC of 0.85 and a test AUC of 0.60. The scientist suspects overfitting due to high cardinality features. Which approach should the scientist use to address this issue?

A.Apply label encoding to the zip code feature
B.Remove the zip code feature entirely
C.Apply target encoding with smoothing to the zip code feature
D.Apply one-hot encoding to the zip code feature
AnswerC

Target encoding reduces cardinality and can improve generalization.

Why this answer

(target encoding with smoothing) reduces cardinality while preserving predictive power. Option A (label encoding) may introduce ordinality issues. Option B (remove zip code) may lose important information.

Option D (one-hot encoding) increases dimensionality drastically.

519
MCQeasy

A data scientist is using a decision tree algorithm for a classification task. The tree is very deep and achieves 100% accuracy on the training set but performs poorly on the test set. Which technique should the data scientist use to improve generalization?

A.Add more features to the dataset.
B.Reduce the number of training samples.
C.Prune the decision tree.
D.Increase the maximum depth of the tree.
AnswerC

Pruning reduces tree complexity and improves generalization.

Why this answer

A deep decision tree that achieves 100% training accuracy but poor test accuracy is overfitting the training data. Pruning the tree removes branches that have little statistical power, reducing complexity and improving generalization to unseen data.

Exam trap

The trap here is that candidates may confuse overfitting with underfitting and choose to increase model complexity (Option D) or add features (Option A), when the correct remedy for overfitting is to reduce complexity through pruning.

How to eliminate wrong answers

Option A is wrong because adding more features typically increases the risk of overfitting by giving the tree more opportunities to memorize noise. Option B is wrong because reducing the number of training samples exacerbates overfitting by providing less data for the tree to learn generalizable patterns. Option D is wrong because increasing the maximum depth would make the tree even deeper and more complex, worsening overfitting rather than improving generalization.

520
MCQeasy

A data scientist is using Amazon SageMaker to train a linear regression model. The training data contains missing values. Which preprocessing step should be applied before training?

A.Ignore missing values; linear regression can handle them.
B.Impute missing values with the mean of the column.
C.Replace missing values with zeros.
D.Remove all rows containing missing values.
AnswerB

Imputation is a common technique to handle missing data.

Why this answer

Linear regression models in Amazon SageMaker cannot handle missing values natively; they require complete numerical input. Imputing missing values with the column mean is a standard preprocessing technique that preserves the overall distribution and avoids introducing bias, ensuring the SageMaker built-in Linear Learner algorithm can train without errors.

Exam trap

The trap here is that candidates may assume linear regression can inherently handle missing values (Option A) due to its statistical robustness, but AWS SageMaker's implementation requires complete data, and ignoring missing values will cause runtime errors or silent model degradation.

How to eliminate wrong answers

Option A is wrong because linear regression algorithms, including SageMaker's Linear Learner, do not accept missing values in the training data; they will either fail or produce incorrect results if missing values are present. Option C is wrong because replacing missing values with zeros can significantly distort the data distribution and model coefficients, especially if the missingness is not random, leading to biased estimates. Option D is wrong because removing all rows with missing values can drastically reduce the dataset size, potentially discarding valuable information and introducing selection bias, which is particularly problematic in small or imbalanced datasets.

521
MCQmedium

A data scientist ran a SageMaker training job that failed with the error shown. The training script expects the data in '/opt/ml/input/data/training/train.csv'. What is the most likely issue?

A.The hyperparameter 'sagemaker_program' is misspelled
B.The training script has a bug in reading the file
C.The channel name should be 'train' instead of 'training'
D.The S3 data path should point to the exact file, not the folder
AnswerD

SageMaker copies the prefix content into the channel directory; if train.csv is not at the root of that prefix, the path is wrong.

Why this answer

The SageMaker training job expects the S3 data path to point directly to the CSV file (e.g., s3://bucket/train.csv), not to a folder containing the file. When the path points to a folder, SageMaker downloads the folder contents but the training script's hardcoded path '/opt/ml/input/data/training/train.csv' fails because the file is not placed at that exact location—SageMaker copies the file into the channel directory with its original name, but the folder path causes the file to be nested or missing, leading to a file-not-found error.

Exam trap

The trap here is that candidates often confuse the channel name (which is arbitrary) with the S3 data path format, assuming the error is about the channel name mismatch rather than the distinction between pointing to a file versus a folder in S3.

How to eliminate wrong answers

Option A is wrong because 'sagemaker_program' is not a valid hyperparameter; the correct hyperparameter is 'sagemaker_program' is actually 'sagemaker_program' is not a standard SageMaker hyperparameter—the training script is specified via the 'entry_point' argument in the Estimator, not a hyperparameter, and a misspelling would cause a different error (e.g., unrecognized hyperparameter). Option B is wrong because the error message indicates a file-not-found issue, not a bug in reading the file; if the script had a bug, it would likely throw a Python exception (e.g., pandas read error) rather than an OS-level file-not-found error. Option C is wrong because the channel name in the SageMaker API is arbitrary and user-defined; the error shows the script expects data in '/opt/ml/input/data/training/', which matches a channel named 'training'—changing it to 'train' would require modifying both the channel definition and the script path, but the error is about the S3 path, not the channel name.

522
MCQeasy

A machine learning engineer is deploying a model to SageMaker for real-time inference. The model is a TensorFlow SavedModel. Which SageMaker capability should be used to create an endpoint?

A.SageMaker hosting with TensorFlow Serving container
B.SageMaker Pipelines
C.SageMaker Model Monitor
D.SageMaker Ground Truth
AnswerA

SageMaker provides managed TensorFlow serving containers, which can be used to host the SavedModel for real-time inference.

Why this answer

SageMaker provides managed TensorFlow serving containers for deploying TensorFlow SavedModels to real-time endpoints. Option B is wrong because SageMaker Pipelines is used for building and managing ML workflows, not for deploying models to endpoints. Option C is wrong because SageMaker Model Monitor is used for monitoring model quality and drift, not for deployment.

Option D is wrong because SageMaker Ground Truth is used for labeling data, not for hosting models.

523
Multi-Selecthard

A data scientist is using Amazon SageMaker Debugger to monitor training. Which THREE types of issues can Debugger monitor?

Select 3 answers
A.Hardware failures
B.Poor weight initialization
C.Data drift
D.Overfitting
E.Vanishing gradients
AnswersB, D, E

Debugger can detect issues from poor initialization.

Why this answer

Amazon SageMaker Debugger can monitor training for poor weight initialization by analyzing tensors and gradients during the training process. It uses built-in rules to detect if weights are initialized with values that are too large or too small, which can lead to slow convergence or failure to learn. This is a core capability of Debugger's real-time monitoring of model parameters.

Exam trap

The trap here is that candidates confuse SageMaker Debugger (which monitors training metrics like gradients and weights) with SageMaker Model Monitor (which monitors inference data for drift and bias), leading them to incorrectly select data drift as a Debugger capability.

524
Multi-Selecthard

A company is using Amazon SageMaker to tune hyperparameters for a gradient boosting model. The objective is to minimize root mean squared error (RMSE). The data scientist wants to explore the hyperparameter space efficiently. Which THREE hyperparameter tuning strategies should the data scientist consider? (Choose 3.)

Select 3 answers
A.Bayesian optimization
B.Random search
C.Grid search
D.Manual search
E.Hyperband
AnswersA, B, E

Uses probabilistic model to guide search.

Why this answer

Bayesian optimization is correct because it builds a probabilistic model of the objective function (RMSE) and uses an acquisition function to select the next hyperparameter combination to evaluate. This approach is sample-efficient, making it ideal for expensive-to-evaluate models like gradient boosting, as it balances exploration and exploitation to find optimal hyperparameters with fewer trials.

Exam trap

The trap here is that candidates often assume grid search is the most thorough strategy, but in practice it is inefficient for high-dimensional spaces, while SageMaker explicitly supports Bayesian optimization, random search, and Hyperband as the three built-in tuning strategies.

525
Multi-Selectmedium

A data scientist is training a neural network for image classification. The training loss is not decreasing significantly, and the validation loss is high. Which TWO actions should the scientist take to address potential vanishing gradients?

Select 2 answers
A.Increase the learning rate
B.Use ReLU activation functions in hidden layers
C.Switch activation functions from ReLU to sigmoid
D.Add batch normalization layers
E.Remove dropout layers
AnswersB, D

ReLU does not saturate for positive inputs, reducing vanishing gradient risk.

Why this answer

ReLU activation functions help mitigate vanishing gradients because they output a constant gradient of 1 for positive inputs, preventing the gradient from shrinking as it propagates backward through many layers. This avoids the exponential decay of gradients that occurs with saturating activations like sigmoid or tanh, enabling effective training of deep networks.

Exam trap

The trap here is that candidates may confuse vanishing gradients with overfitting or learning rate issues, leading them to choose options like increasing the learning rate or removing dropout, which do not address the fundamental gradient propagation problem.

← PreviousPage 7 of 9 · 603 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Ml Modeling questions.