Courseiva

CCNA Ml Modeling Questions

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

151
Multi-Selecthard

A company uses SageMaker to train a model. The training job fails with 'ResourceLimitExceeded' error. Which TWO actions should the company take to resolve this?

Select 2 answers
A.Launch the training job in a different AWS region.
B.Use a different instance type that is not at its limit.
C.Use SageMaker Managed Spot Training to reduce cost.
D.Compress the training data to reduce storage requirements.
E.Request a service limit increase for SageMaker training job resources.
AnswersB, E

Different instance types may have separate limits.

Why this answer

The 'ResourceLimitExceeded' error indicates that the requested instance type has reached its concurrent usage limit in the current AWS region. Switching to a different instance type that is not at its limit allows the training job to proceed without exceeding the service quota. Option E is correct because requesting a service limit increase for SageMaker training job resources directly raises the cap on the number of concurrent instances or total instance count, resolving the underlying quota issue.

Exam trap

The trap here is that candidates confuse 'ResourceLimitExceeded' with cost or storage issues, leading them to select Managed Spot Training or data compression, which do not address the underlying AWS service quota limit.

152
MCQeasy

A data scientist is using Amazon SageMaker to train a deep learning model with a large dataset. The training job fails with a 'CUDA out of memory' error. What is the MOST efficient way to resolve this issue?

A.Switch to a CPU-only instance
B.Use a larger instance type with more GPUs
C.Increase the batch size
D.Reduce the batch size
AnswerD

Smaller batch size reduces memory consumption per GPU.

Why this answer

The 'CUDA out of memory' error occurs when the GPU's memory is insufficient to hold the model parameters, gradients, optimizer states, and the current batch of data. Reducing the batch size decreases the memory footprint per training step, allowing the model to fit within the available GPU memory without requiring a more expensive instance or sacrificing GPU acceleration.

Exam trap

AWS often tests the misconception that 'more resources' (larger instance or more GPUs) is always the best fix, when in fact adjusting hyperparameters like batch size is the most efficient and cost-effective first step.

How to eliminate wrong answers

Option A is wrong because switching to a CPU-only instance would eliminate GPU acceleration entirely, drastically slowing training for deep learning workloads, and does not address the root cause of memory pressure. Option B is wrong because using a larger instance with more GPUs is an expensive overprovisioning solution that does not optimize resource usage; it may also introduce additional complexity with multi-GPU data parallelism. Option C is wrong because increasing the batch size would increase GPU memory consumption, exacerbating the out-of-memory error rather than resolving it.

153
Multi-Selectmedium

A data scientist is building a regression model to predict house prices. The dataset contains 10 features, including 'number_of_bedrooms' and 'square_footage'. The scientist observes that the model has high variance. Which TWO actions are most appropriate to reduce overfitting? (Choose TWO.)

Select 2 answers
A.Reduce model complexity by using a simpler model
B.Add L2 regularization to the model
C.Increase the number of training epochs
D.Decrease the amount of training data
E.Add more polynomial features
AnswersA, B

Simpler models have lower variance.

Why this answer

A is correct because reducing model complexity, such as using a simpler model (e.g., linear regression instead of a high-degree polynomial), directly decreases variance by limiting the model's capacity to fit noise in the training data. This aligns with the bias-variance tradeoff, where simpler models have higher bias but lower variance, making them less prone to overfitting.

Exam trap

The MLS-C01 exam often tests the misconception that adding more data or features always improves model performance, but the trap here is that reducing training data or adding polynomial features increases variance, while regularization and simpler models are the correct countermeasures for overfitting.

154
MCQmedium

A data science team is training a binary classification model using Amazon SageMaker. The dataset is highly imbalanced (95% negative class, 5% positive class). The team wants to maximize the F1 score. Which built-in SageMaker algorithm is most appropriate?

A.Linear Learner
B.XGBoost
C.PCA
D.K-Means
AnswerB

XGBoost has scale_pos_weight parameter to handle imbalance and can optimize for F1.

Why this answer

XGBoost supports scale_pos_weight to handle class imbalance, directly optimizing for F1. Linear Learner with balanced class weights can also help but typically optimizes log loss. K-Means is unsupervised.

PCA is for dimensionality reduction.

155
Multi-Selectmedium

A data scientist is building a binary classifier using logistic regression. The dataset has 10 features and 100,000 observations. The model achieves 99% accuracy on the test set, but the precision is 50% and recall is 90%. Which TWO actions should the data scientist take to improve model performance? (Choose 2.)

Select 2 answers
A.Increase the regularization strength (C) in logistic regression.
B.Adjust the decision threshold to increase precision at the cost of recall.
C.Use a random forest classifier instead of logistic regression.
D.Collect more training data.
E.Remove features that have low correlation with the target.
AnswersB, C

Lowering threshold increases recall; raising threshold increases precision.

Why this answer

The model has high recall (90%) but low precision (50%), indicating many false positives. Two effective approaches are: adjusting the decision threshold (Option B) to require a higher predicted probability for the positive class, which reduces false positives and increases precision at the cost of some recall. Switching to a random forest classifier (Option C) can capture complex interactions and non-linearities, often improving precision by better separating classes.

Option A: Increasing regularization strength (i.e., decreasing C in logistic regression) may help reduce overfitting but does not directly target precision; it may marginally help but is not a primary action. Option D: Collecting more data does not address the underlying class separation issue; it might even amplify imbalance. Option E: Removing features with low correlation could discard valuable information and worsen performance.

156
MCQmedium

A data scientist is using Amazon SageMaker to perform hyperparameter tuning for a neural network. The tuning job uses the 'Random' search strategy. After 10 training jobs, the best objective metric has plateaued. The scientist wants to improve the results without increasing the total number of training jobs. Which approach should they take?

A.Use a different objective metric that is easier to optimize
B.Normalize the input features to have zero mean and unit variance
C.Increase the maximum number of training jobs
D.Switch the hyperparameter tuning strategy to 'Bayesian'
AnswerD

Bayesian optimization uses past trials to inform future hyperparameter choices, often converging faster.

Why this answer

Switching to Bayesian search (e.g., 'Bayesian' strategy) is more efficient because it uses past results to choose the next hyperparameters, potentially finding better values in fewer jobs. Increasing the number of jobs would increase cost. Random search might get lucky but is less efficient.

Changing the objective metric or scaling features would not directly improve the tuning process.

157
MCQhard

A machine learning team trains a deep learning model on SageMaker. The training job uses a single ml.p3.2xlarge instance and takes 12 hours. The team needs to reduce training time without changing the algorithm. Which approach is most effective?

A.Increase the learning rate
B.Switch to a larger instance type, such as ml.p3.16xlarge
C.Use managed Spot Training
D.Use SageMaker's distributed data parallelism across multiple instances
AnswerD

Distributed data parallelism scales training across GPUs, reducing wall-clock time.

Why this answer

Using SageMaker's distributed data parallelism (e.g., with SageMaker distributed training libraries) across multiple GPUs can significantly reduce training time by splitting the mini-batches across GPUs. Increasing instance type to a single larger GPU (e.g., p3.16xlarge) helps but is less effective than multi-GPU distribution. Hyperparameter tuning doesn't directly reduce training time.

Spot instances may interrupt.

158
Multi-Selectmedium

Which THREE of the following are best practices for training deep learning models on Amazon SageMaker?

Select 3 answers
A.Disable automatic scaling to avoid interruptions
B.Use SageMaker Debugger to profile system bottlenecks
C.Use Pipe mode for training data stored in S3 to reduce startup time
D.Always use the largest instance type available for faster training
E.Use managed spot training to reduce cost
AnswersB, C, E

Debugger provides insights into GPU utilization and I/O bottlenecks.

Why this answer

SageMaker Debugger is a best practice because it provides real-time profiling of system bottlenecks such as CPU/GPU utilization, memory I/O, and network throughput during training. This allows you to identify and resolve performance issues early, optimizing training efficiency and cost. It integrates directly with SageMaker's training jobs without requiring code changes.

Exam trap

The trap here is that candidates may confuse 'avoiding interruptions' with disabling automatic scaling, when in fact automatic scaling is designed to prevent interruptions by dynamically adjusting capacity, and disabling it increases the risk of failures.

159
MCQmedium

A team is using SageMaker to train a model with hyperparameter tuning. The training jobs are taking too long. The team wants to reduce time without sacrificing model quality. Which approach should they take?

A.Use random search instead of Bayesian optimization.
B.Enable early stopping in the hyperparameter tuning job.
C.Increase the maximum number of training jobs.
D.Reduce the maximum runtime per training job.
AnswerB

Early stops poorly performing training jobs, saving time.

Why this answer

Enabling early stopping terminates poorly performing training jobs early, saving time without sacrificing model quality. Option A is incorrect: random search may be faster but does not guarantee quality as it is less efficient than Bayesian optimization. Option C is incorrect: increasing the maximum number of training jobs would increase time.

Option D is incorrect: reducing the maximum runtime per training job may prevent convergence, harming model quality.

160
MCQhard

A machine learning engineer is training a deep learning model using the SageMaker built-in XGBoost algorithm. The training job is taking longer than expected. The engineer notices that the training data is stored in S3 in CSV format and is 500 GB in size. The instance type is ml.c4.8xlarge with 10 instances. Which change would most likely reduce training time?

A.Convert the data to Parquet format.
B.Increase the number of instances to 20.
C.Use Pipe input mode instead of File input mode.
D.Increase the size of the EBS volume attached to each instance.
AnswerC

Pipe mode streams data directly, reducing I/O bottleneck.

Why this answer

Pipe input mode streams data directly from S3 to the training instances without first downloading it to the local EBS volume, eliminating the I/O bottleneck of reading a 500 GB CSV file. This reduces the time spent on data loading and allows the XGBoost algorithm to begin training sooner, which is especially beneficial for large datasets.

Exam trap

The MLS-C01 exam often tests the distinction between data format optimization (Parquet) and data ingestion mode (Pipe vs. File), where candidates mistakenly choose a format change without recognizing that the primary bottleneck is the data transfer mechanism, not the storage format.

How to eliminate wrong answers

Option A is wrong because converting to Parquet format would reduce storage size and improve read efficiency, but the primary bottleneck here is the data transfer time from S3 to the instances, not the format overhead; Pipe mode addresses the transfer bottleneck more directly. Option B is wrong because increasing the number of instances to 20 would add more parallelism but also increase the overhead of data distribution and coordination, and the training job is already bottlenecked by data ingestion, not compute capacity. Option D is wrong because increasing the EBS volume size does not improve I/O throughput for reading from S3; the data must still be downloaded from S3 to the EBS volume, so the bottleneck remains.

161
MCQmedium

A data scientist builds a Random Forest model using SageMaker. The model performs well on training data but poorly on test data. Which step is most likely to reduce overfitting?

A.Reduce the maximum depth of each tree
B.Increase the number of trees
C.Switch to a linear model
D.Increase the number of features considered at each split
AnswerA

Shallower trees reduce model complexity and help prevent overfitting.

Why this answer

Reducing the maximum depth of each tree limits the complexity of individual decision trees, preventing them from memorizing noise and specific patterns in the training data. This directly addresses overfitting by enforcing simpler, more generalized splits, which improves performance on unseen test data.

Exam trap

The trap here is that candidates often assume adding more trees (Option B) always improves generalization, but they miss that overfitting in Random Forest is primarily caused by individual trees being too deep, not by the ensemble size.

How to eliminate wrong answers

Option B is wrong because increasing the number of trees in a Random Forest does not reduce overfitting; it typically reduces variance and improves generalization, but if trees are already deep and overfit, more trees will still produce overfit predictions. Option C is wrong because switching to a linear model is an extreme and unnecessary step; Random Forest can be regularized effectively by tuning hyperparameters like max_depth, and a linear model may underfit if the data has non-linear relationships. Option D is wrong because increasing the number of features considered at each split increases tree diversity but also allows each tree to potentially overfit to more features, especially if the features are noisy or irrelevant, thus not reducing overfitting.

162
MCQmedium

A team is training a large language model using SageMaker's distributed training. They notice that the training loss is not decreasing after the first few epochs. Which action is MOST likely to resolve this issue?

A.Increase the batch size
B.Add L2 regularization
C.Reduce the learning rate
D.Switch from Adam to SGD optimizer
AnswerC

A high learning rate can cause the loss to plateau or oscillate. Reducing the learning rate allows the optimizer to take smaller steps, enabling the loss to continue decreasing. This is the most direct fix.

Why this answer

When training loss plateaus or does not decrease after the first few epochs, a common cause is that the learning rate is too high, causing the optimizer to overshoot minima. Reducing the learning rate helps the model converge. Increasing the batch size (option A) mainly affects gradient variance and training speed but does not address an overly large step size.

Adding L2 regularization (option B) helps prevent overfitting but does not resolve a high learning rate. Switching from Adam to SGD (option D) may not help because Adam typically adapts learning rates per parameter; if the base learning rate is too high, both optimizers can struggle. Therefore, reducing the learning rate is the most direct and effective action.

163
MCQmedium

A team trained a multiclass classification model using SageMaker built-in XGBoost. The model's accuracy is high, but for a specific class, recall is very low. The team wants to improve recall for that class without significant accuracy drop. Which approach is MOST effective?

A.Add more training data from all classes
B.Resample the training data to balance the class representation
C.Increase the max_depth hyperparameter of XGBoost
D.Switch from XGBoost to a linear learner
AnswerB

Resampling addresses class imbalance, improving recall for minority class.

Why this answer

Resampling the training data to balance class representation directly addresses the root cause of low recall for a specific class in a multiclass XGBoost model. XGBoost's built-in objective functions (e.g., 'multi:softmax') optimize for overall accuracy, which can bias the model toward majority classes; resampling (e.g., oversampling the minority class or undersampling the majority) forces the model to learn decision boundaries that better capture the minority class, improving recall without drastically reducing overall accuracy.

Exam trap

The trap here is that candidates often assume increasing model complexity (max_depth) or switching algorithms will fix class imbalance, when in fact the most effective and direct approach is to rebalance the training data through resampling.

How to eliminate wrong answers

Option A is wrong because adding more data from all classes does not specifically target the underrepresented class; it may even worsen the imbalance if the new data is also skewed, and it does not guarantee improved recall for the minority class. Option C is wrong because increasing max_depth can lead to overfitting, which might temporarily boost recall on training data but often degrades generalization and overall accuracy, and it does not systematically address class imbalance. Option D is wrong because switching from XGBoost to a linear learner (e.g., LinearLearner in SageMaker) assumes linear separability, which is rarely true for complex multiclass problems; linear models typically have lower capacity to model minority class patterns and often yield worse recall than tree-based methods like XGBoost.

164
MCQeasy

A data scientist is training a model and wants to monitor training progress. Which AWS service can be used to track metrics like loss and accuracy in real time?

A.Amazon SageMaker Ground Truth
B.Amazon SageMaker Automatic Model Tuning
C.AWS Glue
D.Amazon CloudWatch
AnswerD

CloudWatch can monitor custom metrics.

Why this answer

Amazon CloudWatch is the correct service because it provides real-time monitoring of metrics such as loss and accuracy during model training. When using SageMaker, training jobs automatically emit metrics to CloudWatch via the CloudWatch agent, allowing you to view logs and set alarms on metric thresholds in near real-time.

Exam trap

The trap here is that candidates may confuse Amazon SageMaker Automatic Model Tuning (which orchestrates hyperparameter searches) with a monitoring service, but it does not provide real-time metric tracking itself—only CloudWatch does.

How to eliminate wrong answers

Option A is wrong because Amazon SageMaker Ground Truth is a data labeling service, not a monitoring tool for training metrics. Option B is wrong because Amazon SageMaker Automatic Model Tuning (hyperparameter tuning) launches training jobs with different hyperparameters but does not itself track real-time metrics; it relies on CloudWatch for that. Option C is wrong because AWS Glue is a serverless data integration and ETL service, not designed for real-time metric tracking during model training.

165
MCQhard

A data scientist is tuning a gradient boosting model using SageMaker automatic model tuning. The hyperparameter 'num_round' ranges from 50 to 500. The tuning job uses 'ObjectiveMetric' = 'validation:auc'. After 50 training jobs, the best objective value is 0.95. The data scientist suspects overfitting. What should the data scientist do?

A.Increase 'max_depth' to capture more complex patterns.
B.Add an early stopping round and increase the range for regularization hyperparameters like 'gamma' and 'lambda'.
C.Increase 'num_round' to 1000 and keep other hyperparameters unchanged.
D.Decrease the range of 'num_round' to 10-100.
AnswerB

Early stopping prevents overfitting; regularization penalizes complexity.

Why this answer

Adding an early stopping round prevents training after validation performance stops improving, and increasing the range of regularization hyperparameters like 'gamma' (minimum loss reduction) and 'lambda' (L2 regularization) helps penalize overly complex models, reducing overfitting. Option A (increasing 'max_depth') would allow deeper trees that can memorize noise, worsening overfitting. Option C (increasing 'num_round' to 1000) with no regularization and no early stopping would likely lead to further overfitting.

Option D (decreasing 'num_round' to 10-100) might underfit, but it does not address the root cause of overfitting and could reduce performance.

166
Multi-Selecteasy

Which TWO techniques are used for feature scaling? (Choose 2.)

Select 2 answers
A.One-hot encoding
B.Standardization (Z-score normalization)
C.Min-Max scaling
D.Principal Component Analysis (PCA)
E.Label encoding
AnswersB, C

Standardization scales features to have mean 0 and variance 1.

Why this answer

Standardization (Z-score normalization) is a feature scaling technique that transforms data to have a mean of 0 and a standard deviation of 1, using the formula z = (x - μ) / σ. This is essential for algorithms like SVM, k-means, and PCA that assume normally distributed features and are sensitive to feature magnitudes.

Exam trap

The MLS-C01 exam often tests the distinction between feature scaling techniques (which transform numerical feature values) and encoding or dimensionality reduction techniques, leading candidates to mistakenly select one-hot encoding or PCA as scaling methods.

167
MCQeasy

A company is using Amazon SageMaker to deploy a model for real-time inference. The model receives requests with varying payload sizes. The company observes occasional latency spikes. Which feature can help mitigate this?

A.Multi-model endpoints
B.Amazon Elastic Inference
C.Automatic scaling
D.Amazon SageMaker Inference Recommender
AnswerD

Inference Recommender runs benchmarks to recommend optimal instance and endpoint configuration.

Why this answer

SageMaker Inference Recommender provides load testing and recommendations for instance type and endpoint configuration. It can help identify optimal settings to reduce latency spikes. Multi-model endpoints are for hosting multiple models, not directly for latency spikes.

Elastic Inference is for accelerating deep learning inference, not general latency. Automatic scaling adjusts capacity but not per-request latency.

168
MCQhard

A research lab is training a large language model (LLM) on SageMaker using PyTorch. The model has 1 billion parameters and does not fit on a single GPU. They have access to a cluster of 16 p4d.24xlarge instances (each with 8 A100 GPUs). They need to train the model with minimal changes to the training script. Which SageMaker feature should they use?

A.SageMaker's model parallelism with automatic partitioning
B.SageMaker's distributed data parallelism with Horovod
C.Use SageMaker's built-in BlazingText algorithm
D.SageMaker's managed spot training with checkpointing
AnswerA

Model parallelism splits the model across GPUs, and SageMaker's library automates this.

Why this answer

SageMaker's model parallelism is designed for large models that don't fit on a single device.

169
MCQeasy

A company uses Amazon SageMaker to host a model for real-time predictions. The model endpoint is experiencing high latency during peak hours. The data scientist wants to reduce latency without increasing cost. Which action should they take?

A.Enable data capture for the endpoint to log requests
B.Switch to a larger instance type
C.Reduce the number of instances behind the endpoint
D.Enable auto-scaling for the endpoint based on latency metrics
AnswerD

Auto-scaling adjusts capacity to demand, maintaining low latency without over-provisioning.

Why this answer

Using SageMaker's production variants with auto-scaling can help handle traffic spikes without over-provisioning, thus managing latency and cost. Switching to a larger instance would increase cost. Reducing the number of instances would increase latency.

Enabling data capture adds overhead and increases latency.

170
Multi-Selecteasy

Which TWO of the following are common techniques to handle missing values in a dataset?

Select 2 answers
A.Standardization
B.Principal Component Analysis (PCA)
C.One-hot encoding
D.Remove rows with missing values
E.Imputation with mean or median
AnswersD, E

Removing rows is a simple approach.

Why this answer

Options D and E are correct. D is correct because removing rows with missing values (listwise deletion) is a common approach when missing data is random and not extensive. E is correct because imputation with mean or median fills missing values with central tendency measures, preserving data size.

A (standardization) is a scaling technique, not for missing values. B (PCA) is a dimensionality reduction method. C (one-hot encoding) is for converting categorical variables into numerical format, not for handling missing values.

171
MCQhard

A team is using SageMaker to train a custom PyTorch model on a large dataset (10 TB) stored in S3. The training job is repeatedly failing due to 'OutOfMemory' errors on the GPU. The team is using a single ml.p3.8xlarge instance. Which change is most likely to resolve the issue?

A.Change the instance type to ml.p3.16xlarge (more GPUs)
B.Use managed spot training to reduce cost
C.Reduce the batch size in the training script
D.Switch the input mode from Pipe to File
AnswerC

Reducing batch size decreases GPU memory usage per step, resolving OOM errors.

Why this answer

The 'OutOfMemory' error on the GPU indicates that the model and its associated data exceed the available GPU memory. Reducing the batch size directly decreases the memory footprint per training step, allowing the model to fit within the GPU's memory limits. This is the most direct and effective fix for GPU OOM errors, as it reduces the amount of data processed simultaneously without changing the instance type or input mode.

Exam trap

The MLS-C01 exam often tests the misconception that adding more GPUs (Option A) solves per-GPU memory issues, but the OOM error is per-device and requires reducing per-device memory usage, not increasing the number of devices.

How to eliminate wrong answers

Option A is wrong because switching to ml.p3.16xlarge adds more GPUs but does not increase the memory per GPU (each GPU still has 16 GB); the OOM error occurs on a single GPU, so more GPUs won't resolve the per-GPU memory exhaustion. Option B is wrong because managed spot training reduces cost but does not affect GPU memory usage; it could even cause interruptions that complicate debugging. Option D is wrong because switching from Pipe to File input mode changes how data is streamed (Pipe streams directly from S3, File downloads to local storage) but does not reduce the memory consumed by batches during training; in fact, File mode may increase local disk usage but not GPU memory.

172
MCQmedium

A data scientist is training a binary classification model on a dataset with 100 features and 10,000 rows. The model overfits significantly: training accuracy is 99%, but validation accuracy is 80%. The data scientist has tried L1 and L2 regularization without improvement. The dataset is clean and representative. Which approach is MOST likely to reduce overfitting? A. Increase the number of training epochs. B. Add more training data by generating synthetic samples using SMOTE. C. Reduce the number of features using PCA. D. Use a simpler model like logistic regression instead of a decision tree ensemble. The data scientist needs to maintain a validation accuracy above 85%, but the current model is too complex. The company has limited budget for data labeling. Which option is BEST?

A.Use a simpler model like logistic regression
B.Add more training data by generating synthetic samples using SMOTE
C.Reduce the number of features using PCA
D.Increase the number of training epochs
AnswerA

Simpler model reduces capacity and overfitting.

Why this answer

The current model (likely a decision tree ensemble like Random Forest or XGBoost) is too complex for the dataset, causing overfitting. Switching to a simpler model like logistic regression reduces variance by limiting the hypothesis space, which directly addresses overfitting without requiring additional data or feature engineering. Given the limited labeling budget, this approach is cost-effective and can improve generalization, potentially achieving the required >85% validation accuracy.

Exam trap

The trap here is that candidates often assume more data (SMOTE) or dimensionality reduction (PCA) will always reduce overfitting, but in this scenario the core issue is model complexity, not data quantity or feature noise.

How to eliminate wrong answers

Option B is wrong because SMOTE generates synthetic samples by interpolating between existing minority class instances, which does not add new independent information; it can exacerbate overfitting by creating artificial patterns that the model already memorizes. Option C is wrong because PCA reduces dimensionality by projecting features onto principal components, but it is unsupervised and may discard features that are discriminative for the binary classification task, potentially harming validation accuracy. Option D is wrong because increasing the number of training epochs allows the model to further minimize training loss, which worsens overfitting by making the model memorize noise rather than generalize.

173
Multi-Selecthard

A company is deploying a real-time inference endpoint with SageMaker. The model is a large neural network that requires GPU acceleration. Which TWO configurations must be set?

Select 2 answers
A.Instance type with GPU
B.Create a SageMaker model with the inference code and model artifacts
C.Batch transform job
D.Production variant
E.Training container image
AnswersA, B

Required for GPU inference.

Why this answer

Deploying a real-time inference endpoint with a large neural network that requires GPU acceleration necessitates selecting an instance type with a GPU, such as the ml.p3 or ml.g4dn series, to provide the parallel processing power needed for low-latency inference. Without a GPU instance, the model would fall back to CPU, leading to unacceptable inference times for large neural networks.

Exam trap

The trap here is that candidates often confuse the required configurations for deploying a real-time endpoint with those for training or batch processing, mistakenly selecting Batch Transform or Training Container Image instead of recognizing that the instance type with GPU and the SageMaker model definition are the two essential components.

174
MCQhard

A data scientist is using Amazon SageMaker to train a model with a large dataset that does not fit into memory on a single instance. The training algorithm supports distributed training. Which approach should the scientist use to train the model efficiently?

A.Use SageMaker File mode and increase the instance volume size
B.Use Amazon EMR to preprocess data and then train on a smaller sample
C.Split the data into smaller files and use multiple training jobs sequentially
D.Use SageMaker Pipe mode to stream data directly from S3
AnswerD

Pipe mode allows the algorithm to read data on the fly, handling large datasets.

Why this answer

SageMaker Pipe mode streams data from S3 directly to the training algorithm without writing to disk, enabling processing of large datasets beyond memory.

175
MCQhard

A company is deploying a real-time fraud detection system using a gradient boosting model on AWS SageMaker. The model uses 200 features and is trained on 50 GB of data. The inference latency requirement is under 10 ms per request. During load testing, the endpoint shows average latency of 15 ms. Which change is MOST likely to reduce latency below 10 ms?

A.Switch to a GPU-based instance type
B.Reduce the number of features to the top 50 based on feature importance
C.Increase the number of trees in the model
D.Use a larger batch size for inference
AnswerB

Fewer features reduce inference computation time, directly lowering latency.

Why this answer

Reducing the number of features from 200 to the top 50 directly decreases the amount of data each inference request must process, which lowers both feature engineering overhead and model evaluation time. For gradient boosting models on SageMaker, fewer features mean fewer decision tree splits to traverse per prediction, which can significantly reduce latency without requiring hardware changes. This is the most direct and cost-effective way to meet the 10 ms requirement.

Exam trap

The trap here is that candidates often assume GPU instances universally speed up inference, but for tree-based models like gradient boosting, the bottleneck is sequential tree traversal, not parallel computation, so feature reduction is the correct optimization.

How to eliminate wrong answers

Option A is wrong because switching to a GPU-based instance type does not inherently reduce latency for gradient boosting models; GPUs excel at parallel matrix operations (e.g., deep learning) but offer minimal benefit for tree-based models where inference is sequential and CPU-bound. Option C is wrong because increasing the number of trees in the model increases the ensemble size, requiring more sequential evaluations per prediction, which would increase latency, not reduce it. Option D is wrong because using a larger batch size for inference increases throughput (requests per second) but does not reduce per-request latency; in fact, it can increase latency for individual requests due to queuing and processing delays.

176
MCQeasy

A data scientist is building a binary classifier and obtains the following confusion matrix on the test set: TP=80, FP=20, TN=70, FN=30. What is the precision?

A.0.727
B.0.8
C.0.75
D.0.762
AnswerB

Precision = TP/(TP+FP) = 80/100 = 0.8.

Why this answer

Precision = TP / (TP+FP) = 80/(80+20)=0.8. Recall = TP/(TP+FN)=80/110≈0.727. Accuracy = (80+70)/200=0.75.

F1 = 2*(0.8*0.727)/(0.8+0.727)≈0.762.

177
MCQmedium

A data scientist is using Amazon SageMaker to train a model with a custom Docker container. The training job fails with an error: 'Container exited with code 137'. What is the most likely cause?

A.The training data was corrupted.
B.The training job exceeded the maximum runtime.
C.The Docker entrypoint script was not found.
D.The training instance ran out of memory.
AnswerD

Exit code 137 indicates OOM kill.

Why this answer

Exit code 137 (128+9) indicates the container was killed by the SIGKILL signal, which typically occurs when the Linux Out-Of-Memory (OOM) killer terminates a process that has exceeded its memory allocation. In Amazon SageMaker, training instances have finite memory, and if the training algorithm or data loading exceeds that limit, the OOM killer forcibly stops the container, resulting in exit code 137.

Exam trap

The trap here is that candidates often confuse exit code 137 with a generic 'container error' or 'runtime timeout' (option B), not realizing that 137 specifically signals a SIGKILL from the OOM killer due to memory exhaustion.

How to eliminate wrong answers

Option A is wrong because corrupted training data would typically cause a non-zero exit code like 1 or a Python traceback, not a SIGKILL (137). Option B is wrong because exceeding the maximum runtime results in exit code 143 (SIGTERM) or a timeout error, not 137. Option C is wrong because a missing entrypoint script would cause an immediate container startup failure with exit code 127 (command not found) or 126 (permission denied), not a memory-related kill signal.

178
MCQmedium

A company is using SageMaker's built-in image classification algorithm to classify product images into 100 categories. The training takes 3 hours on a single p3.2xlarge instance. They need to reduce training time to under 1 hour. They have access to a cluster of 4 p3.2xlarge instances. Which approach should they take?

A.Use SageMaker's hyperparameter tuning to find faster convergence
B.Use a smaller batch size on each instance
C.Use SageMaker's managed spot training with checkpointing
D.Use SageMaker's distributed training with data parallelism using Horovod
AnswerD

Data parallelism across 4 instances can reduce training time nearly linearly.

Why this answer

SageMaker's built-in image classification algorithm supports distributed training with data parallelism using Horovod, which splits the mini-batch across multiple GPUs and synchronizes gradients via allreduce. With 4 p3.2xlarge instances (each with 1 GPU), this reduces per-iteration time proportionally, enabling the 3-hour job to complete in under 1 hour when scaling batch size and learning rate appropriately.

Exam trap

The trap here is that candidates confuse cost-saving techniques (spot training) or accuracy-tuning methods (hyperparameter tuning) with performance scaling, failing to recognize that distributed data parallelism is the only option that directly reduces training time by leveraging multiple GPUs in parallel.

How to eliminate wrong answers

Option A is wrong because hyperparameter tuning (e.g., learning rate, momentum) optimizes model accuracy, not training speed; it actually increases total wall-clock time by launching multiple training jobs. Option B is wrong because using a smaller batch size on each instance reduces GPU utilization and increases the number of iterations, making training slower, not faster. Option C is wrong because managed spot training with checkpointing reduces cost by using preemptible instances, but does not reduce training time; it may even add delays from interruptions and checkpoint restores.

179
MCQeasy

A data scientist is training a binary classification model and wants to evaluate its performance using a metric that is robust to class imbalance. Which metric should be used?

A.Mean squared error
B.Area under the ROC curve (AUC)
C.F1 score
D.Accuracy
AnswerC

F1 score balances precision and recall and is robust to class imbalance.

Why this answer

The F1 score is the harmonic mean of precision and recall and is robust to class imbalance because it considers both false positives and false negatives. Accuracy can be misleading with imbalanced classes.

180
MCQhard

A company uses Amazon SageMaker to train a deep learning model for image classification. The training dataset consists of 500,000 images, each 256x256 pixels, stored in S3. The team uses a single ml.p3.2xlarge instance for training. The training time is unacceptably long (over 48 hours). The team wants to reduce training time without sacrificing model accuracy. They have already optimized the data pipeline by using SageMaker Pipe mode and sharding the S3 dataset. The model is a ResNet-50 implemented in TensorFlow. The team is considering the following options: A) Switch to a ml.p3.16xlarge instance which has 8 GPUs and more memory. B) Implement distributed data parallelism using Horovod across multiple instances. C) Use SageMaker's built-in Hyperparameter Tuning to find optimal hyperparameters. D) Reduce the image resolution to 128x128 to speed up training. Which option will MOST effectively reduce training time while maintaining accuracy?

A.Switch to a ml.p3.16xlarge instance
B.Reduce the image resolution to 128x128
C.Implement distributed data parallelism using Horovod across multiple instances
D.Use SageMaker's built-in Hyperparameter Tuning
AnswerC

Horovod enables efficient multi-GPU, multi-instance training, scaling training time linearly.

Why this answer

Using multiple instances with Horovod for distributed data parallelism can scale training linearly with the number of GPUs, significantly reducing time. A larger single instance (ml.p3.16xlarge) provides 8 GPUs but still limited by single instance. Hyperparameter tuning does not directly reduce training time.

Reducing resolution may lose accuracy.

181
MCQmedium

A company is using Amazon SageMaker to deploy a model for real-time inference. The model requires 500 MB of memory and has a latency requirement of 100 ms. The endpoint is receiving 10 requests per second. Which instance type should be chosen for cost-effectiveness?

A.ml.c5.xlarge
B.ml.t2.medium
C.ml.m5.large
D.ml.p3.2xlarge
AnswerC

Adequate memory and cost-effective.

Why this answer

Ml.m5.large (Option C). This instance type provides 2 vCPU and 8 GB memory, which is more than sufficient for the 500 MB memory requirement. It also offers consistent performance suitable for real-time inference with 10 requests per second and 100 ms latency.

Option A (ml.c5.xlarge) has 4 vCPU and 8 GB, which is over-provisioned and more expensive. Option B (ml.t2.medium) has only 4 GB memory but uses burstable CPU, which may cause latency spikes. Option D (ml.p3.2xlarge) is GPU-optimized and significantly more expensive, making it unsuitable for a CPU-bound workload.

Therefore, ml.m5.large is the most cost-effective choice.

182
MCQeasy

A data scientist is using Amazon SageMaker to train a linear regression model. The target variable is right-skewed. Which transformation should the data scientist apply to the target variable to improve model performance?

A.Min-max scaling
B.One-hot encoding
C.Log transformation
D.Principal Component Analysis (PCA)
AnswerC

Log transformation reduces right skewness.

Why this answer

(Log transformation) is correct because applying a logarithmic transformation to a right-skewed target variable can reduce skewness and make the distribution more normal, which improves the performance of linear regression models. Option A (Min-max scaling) scales the data to a fixed range but does not address skewness. Option B (One-hot encoding) is used for categorical variables, not for transforming continuous targets.

Option D (PCA) is for dimensionality reduction, not for correcting skewness.

183
MCQhard

A data scientist is training a time series forecasting model using Amazon SageMaker's DeepAR algorithm. The dataset contains daily sales data for 10,000 products over 2 years. The scientist splits the data chronologically: training on the first 18 months, validation on the next 3 months, and test on the last 3 months. The model performs well on validation but poorly on test. The data scientist suspects the model is overfitting to the validation period. Which action should the scientist take to improve test performance?

A.Use time series cross-validation with an expanding window
B.Reduce the context length to 30 days
C.Add more exogenous features like holidays and promotions
D.Use the entire dataset for training and ignore validation
AnswerA

Correct. Expanding window cross-validation uses multiple validation periods, reducing overfitting to a single validation window and improving generalization to the test period.

Why this answer

Time series cross-validation with an expanding window evaluates the model on multiple validation periods, ensuring robustness and reducing overfitting to a single validation window. Option B reduces context length and may lose long-term dependencies. Option C may introduce irrelevant features and does not address overfitting to validation.

Option D removes validation entirely, which would not help diagnose or reduce overfitting.

184
MCQeasy

A data scientist wants to automate the selection of optimal hyperparameters for a model. Which SageMaker feature should be used?

A.SageMaker Debugger
B.SageMaker Model Monitor
C.SageMaker Automatic Model Tuning
D.SageMaker Experiments
AnswerC

Automatic Model Tuning optimizes hyperparameters.

Why this answer

SageMaker Automatic Model Tuning (AMT) is the correct feature because it automates hyperparameter optimization by running multiple training jobs with different hyperparameter combinations, using algorithms like Bayesian optimization or random search to find the best set. This directly addresses the requirement to automate selection of optimal hyperparameters.

Exam trap

The trap here is that candidates confuse SageMaker Experiments (which tracks and compares runs) with Automatic Model Tuning (which actively searches for optimal hyperparameters), leading them to pick D instead of C.

How to eliminate wrong answers

Option A is wrong because SageMaker Debugger monitors and debugs training jobs in real-time (e.g., detecting vanishing gradients or overfitting), but it does not perform hyperparameter optimization. Option B is wrong because SageMaker Model Monitor detects data drift and quality issues in deployed endpoints, not hyperparameter tuning during training. Option D is wrong because SageMaker Experiments tracks and organizes training runs, metrics, and parameters for comparison, but it does not automatically select optimal hyperparameters.

185
MCQhard

A company wants to build a machine learning model to predict customer churn. The dataset includes customer demographics, usage patterns, and support interactions. The data is stored in Amazon S3. The data scientist needs to perform feature engineering, including creating aggregate features from support interactions and encoding categorical variables. Which AWS service is most suitable for building the feature engineering pipeline?

A.AWS Glue
B.Amazon EMR
C.AWS Batch
D.Amazon SageMaker Processing
AnswerD

SageMaker Processing is purpose-built for data preprocessing and feature engineering with SageMaker.

Why this answer

Amazon SageMaker Processing is the most suitable service because it is purpose-built for data preprocessing and feature engineering within the SageMaker ecosystem. It allows you to run custom Python scripts (e.g., using pandas or PySpark) on managed infrastructure to create aggregate features from support interactions and encode categorical variables, and it integrates seamlessly with SageMaker for model training and deployment.

Exam trap

The trap here is that candidates often confuse AWS Glue (a general ETL tool) with SageMaker Processing, but the question specifically asks for a service that integrates with the SageMaker model building pipeline, making SageMaker Processing the correct choice.

How to eliminate wrong answers

Option A is wrong because AWS Glue is primarily a serverless ETL service for data cataloging and schema discovery, not optimized for running custom feature engineering scripts with tight integration to SageMaker training jobs. Option B is wrong because Amazon EMR is a big data platform for running distributed frameworks like Spark and Hadoop, which is overkill and less integrated for simple feature engineering tasks that SageMaker Processing can handle more directly. Option C is wrong because AWS Batch is a general-purpose batch computing service for running any containerized workload, but it lacks native integration with SageMaker’s model building pipeline and does not provide the same level of convenience for feature engineering steps.

186
Multi-Selecteasy

A data scientist is performing feature selection for a linear regression model. Which TWO methods are appropriate? (Choose TWO.)

Select 2 answers
A.Lasso (L1) regularization
B.Ridge (L2) regularization
C.t-distributed stochastic neighbor embedding (t-SNE)
D.Forward selection
E.Principal component analysis (PCA)
AnswersA, D

Lasso can zero out feature coefficients, effectively selecting features.

Why this answer

Both Lasso (L1) regularization and forward selection are appropriate feature selection methods for linear regression. Lasso adds an L1 penalty that shrinks some coefficients exactly to zero, effectively selecting features. Forward selection iteratively adds features based on improvement to the model.

Option B (Ridge) is incorrect because L2 regularization shrinks coefficients but does not set them to zero. Option C (t-SNE) is a nonlinear dimensionality reduction technique for visualization, not feature selection. Option E (PCA) creates new components, but does not select original features.

187
MCQeasy

A data scientist is training a binary classification model on an imbalanced dataset (95% negative class, 5% positive class). The model achieves 95% accuracy but only predicts the negative class for all examples. Which metric should the scientist use to evaluate model performance more appropriately?

A.F1 score
B.Mean squared error
C.Accuracy
D.AUC-ROC
AnswerD

AUC-ROC evaluates the model's ability to distinguish between classes regardless of threshold and is robust to imbalance.

Why this answer

AUC-ROC is robust to class imbalance because it evaluates the model's ability to discriminate between positive and negative classes across all classification thresholds, rather than relying on a single threshold. In this scenario, the model predicts only the negative class, so its true positive rate is 0 and false positive rate is 0, yielding an AUC-ROC of 0.5 (random performance), which correctly reflects the model's lack of predictive power.

Exam trap

The trap here is that candidates often choose F1 score (Option A) thinking it handles imbalance well, but they forget that F1 score requires at least some true positives to be meaningful, and in this extreme case where the model predicts only negatives, F1 score collapses to 0 or undefined, whereas AUC-ROC correctly identifies random performance.

How to eliminate wrong answers

Option A is wrong because F1 score is a harmonic mean of precision and recall, but when the model predicts only the negative class, recall is 0 (no true positives), making the F1 score undefined or 0, which does not provide a meaningful evaluation of the model's overall discriminative ability. Option B is wrong because mean squared error (MSE) is a regression metric that measures average squared differences between predicted and actual values; it is not designed for binary classification and does not account for class imbalance or threshold behavior. Option C is wrong because accuracy is misleading on imbalanced datasets; a model that always predicts the majority class achieves high accuracy (95%) but fails to identify any positive instances, so accuracy does not reflect the model's true performance on the minority class.

188
MCQmedium

A data scientist is working with a dataset containing categorical features with high cardinality. The scientist wants to use a tree-based model. Which encoding method should be used?

A.Ordinal encoding
B.Target encoding
C.Label encoding
D.One-hot encoding
AnswerC

Label encoding assigns arbitrary integers to categories. Tree-based models can use these integers effectively because they split on feature values without assuming order. This avoids expanding the feature space.

Why this answer

For tree-based models, label encoding (option C) is typically recommended for high-cardinality categorical features because tree models can handle integer encoding without assuming any order—they split on values, not on ordinal relationships. Ordinal encoding (option A) implies an artificial order that may not exist, potentially misleading the model. One-hot encoding (option D) creates too many dimensions.

Target encoding (option B) can cause overfitting, especially with high cardinality.

189
MCQmedium

A data scientist is training a binary classification model on an imbalanced dataset where the positive class represents 1% of the data. The model needs to maximize recall while keeping precision above 0.7. Which sampling strategy should the data scientist use?

A.NearMiss from imbalanced-learn to undersample the majority class based on distance to minority samples.
B.SMOTE from imbalanced-learn to generate synthetic samples for the minority class.
C.RandomUnderSampler from imbalanced-learn to undersample the majority class.
D.TomekLinks from imbalanced-learn to remove overlapping samples.
E.RandomOverSampler from imbalanced-learn to oversample the minority class.
AnswerB

SMOTE creates synthetic samples, balancing the dataset and improving recall while preserving precision.

Why this answer

(SMOTE) is correct because it generates synthetic samples for the minority class, which can improve recall without discarding data, and synthetic samples help maintain precision above 0.7 by providing more balanced training. Option A (NearMiss) undersamples majority samples based on distance, potentially discarding important data and reducing recall. Option C (RandomUnderSampler) may lose too many majority samples, harming recall and precision.

Option D (TomekLinks) only removes overlapping samples, which does not sufficiently address imbalance. Option E (RandomOverSampler) duplicates minority samples, which can cause overfitting and reduce precision on unseen data.

190
MCQmedium

A company is using Amazon SageMaker to build a binary classification model for customer churn. The dataset is highly imbalanced (90% no churn, 10% churn). Which technique is MOST effective for handling class imbalance?

A.Use accuracy as the evaluation metric.
B.Undersample the majority class.
C.Use SMOTE to generate synthetic samples for the minority class.
D.Train a random forest model instead of logistic regression.
AnswerC

SMOTE is a standard oversampling technique.

Why this answer

SMOTE (Synthetic Minority Oversampling Technique) is the most effective option because it generates synthetic samples for the minority class by interpolating between existing minority instances, thereby balancing the dataset without discarding valuable majority-class data. This approach directly addresses the class imbalance in a binary classification task on SageMaker, improving model recall for the churn class without the information loss caused by undersampling.

Exam trap

The trap here is that candidates often assume switching to a tree-based model (like random forest) inherently solves class imbalance, but the exam tests that explicit resampling or cost-sensitive techniques are required for effective handling.

How to eliminate wrong answers

Option A is wrong because accuracy is a misleading metric for imbalanced datasets; a model that predicts 'no churn' for all instances would achieve 90% accuracy but fail to identify any churn cases. Option B is wrong because undersampling the majority class discards potentially useful data, which can lead to loss of information and reduced model performance, especially when the dataset is not extremely large. Option D is wrong because simply switching to a random forest model does not inherently address class imbalance; while tree-based models can handle imbalance better than logistic regression, they still require explicit imbalance-handling techniques like SMOTE or class weighting to be effective.

191
Multi-Selecteasy

Which TWO actions are best practices for tuning hyperparameters using Amazon SageMaker Automatic Model Tuning?

Select 2 answers
A.Set the number of training jobs to a very large value
B.Use the same hyperparameters as the baseline model
C.Use Bayesian optimization strategy
D.Use grid search strategy
E.Use random search strategy
AnswersC, E

Bayesian optimization is effective and efficient.

Why this answer

Amazon SageMaker Automatic Model Tuning supports Bayesian optimization, random search, and grid search strategies. Bayesian optimization (Option C) is efficient for finding optimal hyperparameters by exploring promising regions. Random search (Option E) is effective for high-dimensional spaces and often outperforms grid search.

Grid search (Option D) is not recommended for many hyperparameters due to combinatorial explosion. Setting a very large number of training jobs (Option A) is costly and unnecessary. Using the same hyperparameters as the baseline model (Option B) does not perform tuning.

Therefore, the best practices are Options C and E.

192
MCQhard

A data scientist is training a deep learning model for image classification. The model is overfitting on the training data. Which combination of techniques will most effectively reduce overfitting?

A.Add dropout layers and use data augmentation
B.Reduce the batch size
C.Train for more epochs without early stopping
D.Increase the number of layers and neurons
AnswerA

Dropout randomly drops units to prevent co-adaptation; data augmentation increases effective training set size, both reduce overfitting.

Why this answer

Dropout layers randomly deactivate a fraction of neurons during training, which forces the network to learn more robust features and prevents co-adaptation. Data augmentation artificially expands the training dataset by applying transformations (e.g., rotation, flipping, cropping), which reduces the model's ability to memorize spurious patterns and improves generalization. Together, these techniques directly counteract overfitting by increasing regularization and effective training diversity.

Exam trap

The MLS-C01 exam often tests the misconception that increasing model complexity (more layers/neurons) or training longer will fix overfitting, when in reality these actions worsen it, and that simple hyperparameter changes like batch size reduction are not primary regularization techniques.

How to eliminate wrong answers

Option B is wrong because reducing the batch size introduces noisier gradient estimates, which can sometimes act as a mild regularizer but is not a primary or reliable technique to combat overfitting; it may even destabilize training. Option C is wrong because training for more epochs without early stopping will exacerbate overfitting, as the model will continue to memorize noise in the training data. Option D is wrong because increasing the number of layers and neurons increases model capacity, which makes overfitting worse by allowing the network to fit training data more precisely.

193
MCQhard

A data scientist is training a neural network for image classification. The dataset has 50,000 images across 100 classes. The model uses a ResNet-50 architecture pre-trained on ImageNet. The training loss decreases rapidly, but validation loss starts to increase after 5 epochs. Which of the following is the most effective technique to address this?

A.Increase the learning rate
B.Add more layers to the network
C.Use data augmentation to increase the diversity of the training set
D.Use a smaller batch size
AnswerC

Data augmentation artificially expands the training set, reducing overfitting and improving generalization.

Why this answer

The rapid decrease in training loss followed by an increase in validation loss after only 5 epochs is a classic sign of overfitting. Data augmentation artificially expands the training set by applying random transformations (e.g., rotations, flips, crops) to existing images, which improves the model's generalization and reduces overfitting. This is the most effective technique among the options because it directly addresses the lack of diverse training examples without changing the model architecture or training hyperparameters in a way that could destabilize learning.

Exam trap

The trap here is that candidates often confuse overfitting with underfitting or training instability, and incorrectly choose to increase learning rate or add layers, not recognizing that the validation loss rising while training loss falls is the textbook symptom of overfitting that requires regularization or more data.

How to eliminate wrong answers

Option A is wrong because increasing the learning rate would likely cause the optimizer to overshoot minima, making both training and validation loss unstable or diverge, which does not fix overfitting. Option B is wrong because adding more layers to an already deep ResNet-50 would increase model capacity and exacerbate overfitting, especially with a fixed dataset size. Option D is wrong because using a smaller batch size introduces more noise into gradient estimates, which can sometimes act as a regularizer but is less reliable and effective than data augmentation for addressing overfitting in image classification; it may also slow convergence.

194
MCQhard

A data scientist is working on a multi-class classification problem with 10 classes. The model outputs probabilities and the scientist wants to evaluate the model's ability to rank classes correctly. Which metric is most appropriate?

A.F1 score
B.Accuracy
C.Area Under the ROC Curve (AUC-ROC)
D.Log loss
AnswerC

Area Under the ROC Curve measures ranking ability; one-vs-rest AUC can be used for multi-class.

Why this answer

The most appropriate metric for evaluating a multi-class classifier's ability to rank classes (i.e., order classes by predicted probability) is the Area Under the ROC Curve (AUC-ROC). AUC-ROC measures the model's ability to distinguish between classes across all thresholds, and for multi-class problems it can be extended using one-vs-rest or macro/micro averaging. Log loss (Option D) measures probability calibration, not ranking.

F1 score (Option A) is a threshold-dependent metric suitable for binary or per-class evaluation, not overall ranking. Accuracy (Option B) is also threshold-dependent and does not consider probability ranking. Therefore, Option C (AUC-ROC) is correct.

195
MCQmedium

A data scientist is building a regression model to predict house prices. The dataset includes features such as square footage, number of bedrooms, and location. After training a linear regression model, the scientist notices that the residuals have a pattern: they increase as the predicted value increases. Which action is most appropriate?

A.Remove outliers from the dataset
B.Use Ridge regression instead of linear regression
C.Add polynomial features to the model
D.Apply a log transformation to the target variable
AnswerD

Log transformation can stabilize variance and reduce heteroscedasticity.

Why this answer

Patterned residuals (heteroscedasticity) violating linear regression assumptions. Log-transforming the target variable can stabilize variance. Adding polynomial features or interactions may help with non-linearity but not specifically for heteroscedasticity.

Ridge regression is for multicollinearity, not for patterned residuals.

196
MCQhard

A company uses Amazon SageMaker to train a model for fraud detection. The dataset has 1 million transactions, with 0.1% fraud. The data scientist trains a random forest model and achieves 99.9% accuracy but 0% recall on the fraud class. Which technique is most likely to improve recall without significantly reducing precision?

A.Tune the classification threshold
B.Use cost-sensitive learning with a high cost for fraud misclassification
C.Apply SMOTE to generate synthetic fraud samples
D.Undersample the majority class
AnswerC

SMOTE creates synthetic instances of the minority class, balancing the dataset and improving recall while maintaining precision.

Why this answer

SMOTE (Synthetic Minority Oversampling Technique) generates synthetic fraud samples by interpolating between existing minority class instances, which directly addresses the extreme class imbalance (0.1% fraud). This increases the representation of the fraud class in the training data, allowing the random forest model to learn decision boundaries that capture fraud patterns, thereby improving recall without introducing the noise or information loss associated with other methods.

Exam trap

The trap here is that candidates often assume cost-sensitive learning (Option B) is the best approach for imbalanced data, but in extreme imbalance with 0% recall, oversampling techniques like SMOTE are more effective because they directly increase the minority class representation rather than just adjusting penalties.

How to eliminate wrong answers

Option A is wrong because tuning the classification threshold can trade off precision and recall, but with 0% recall, the model is already predicting all instances as non-fraud; lowering the threshold may increase recall but will likely cause a drastic drop in precision due to the overwhelming majority class. Option B is wrong because cost-sensitive learning assigns a higher penalty to fraud misclassification during training, which can improve recall, but it does not directly address the lack of fraud examples in the dataset and may still result in poor precision if the model cannot learn from sparse data. Option D is wrong because undersampling the majority class reduces the dataset size and discards potentially useful information, which can lead to loss of decision boundary details and decreased model performance, often harming precision more than helping recall.

197
MCQhard

A team is using SageMaker to train a deep learning model for image classification. The training job is failing with a 'CUDA out of memory' error. The team is using a p3.2xlarge instance (1 GPU, 16 GB GPU memory). The dataset consists of 256x256 RGB images. Which action is MOST likely to resolve the error without changing the instance type?

A.Increase the batch size to utilize GPU more efficiently
B.Enable automatic model tuning to optimize hyperparameters
C.Use Spot Instances to reduce cost
D.Reduce the batch size
AnswerD

Smaller batch size reduces memory footprint per iteration, resolving OOM errors.

Why this answer

The 'CUDA out of memory' error indicates that the GPU memory is exhausted. Reducing the batch size directly decreases the memory footprint per training step, allowing the model to fit within the 16 GB GPU memory of the p3.2xlarge instance. This is the most direct and effective fix without changing the instance type.

Exam trap

The trap here is that candidates may confuse 'CUDA out of memory' with a performance issue and incorrectly choose to increase batch size for efficiency, when in fact the error is a hard memory limit that requires reducing memory usage.

How to eliminate wrong answers

Option A is wrong because increasing the batch size would increase GPU memory consumption, worsening the out-of-memory error. Option B is wrong because automatic model tuning (hyperparameter optimization) does not directly address GPU memory limits; it may even suggest larger batch sizes that exacerbate the issue. Option C is wrong because Spot Instances reduce cost but do not affect GPU memory capacity; the error would persist regardless of instance pricing model.

198
MCQmedium

A company uses Amazon SageMaker to train an XGBoost model on a large dataset. Training takes a long time. Which action can reduce training time without significantly affecting model accuracy?

A.Use a deep neural network instead
B.Increase the learning rate
C.Use a larger instance type
D.Enable early stopping
AnswerD

Early stopping stops when no improvement.

Why this answer

Early stopping halts training when the model's performance on a validation set stops improving for a specified number of rounds. This prevents overfitting and reduces training time by eliminating unnecessary iterations, while typically preserving accuracy because the optimal model is already found.

Exam trap

AWS often tests the misconception that increasing learning rate or using more powerful hardware always speeds up training without side effects, but the correct answer focuses on algorithmic efficiency rather than resource scaling.

How to eliminate wrong answers

Option A is wrong because replacing XGBoost with a deep neural network generally increases training time and requires more data and tuning, not reducing time. Option B is wrong because increasing the learning rate can cause the model to converge to a suboptimal solution or diverge, significantly reducing accuracy. Option C is wrong because using a larger instance type increases computational resources and may reduce wall-clock time, but it does not reduce the total compute time or algorithmic iterations; it also incurs higher cost and does not address the root cause of long training.

199
MCQmedium

A data scientist is using Amazon SageMaker to train a model on a dataset that contains both numerical and categorical features. The categorical features have high cardinality (e.g., postal codes, product IDs). Which feature engineering approach is most suitable for handling these high-cardinality categorical features in a tree-based model?

A.One-hot encode the categorical features
B.Use label encoding
C.Apply target encoding
D.Apply binary encoding
AnswerB

Tree-based models like XGBoost can effectively use label-encoded features because they make splits based on ordering.

Why this answer

Label encoding is suitable for tree-based models because these models split on feature values and can handle ordinal relationships implicitly. Unlike linear models, tree-based models do not assume any distance metric between categories, so label encoding avoids the dimensionality explosion of one-hot encoding while preserving the ability to capture splits based on high-cardinality features.

Exam trap

The trap here is that candidates often default to one-hot encoding for categorical features without considering the model type, failing to recognize that tree-based models can effectively use label encoding for high-cardinality features without the drawbacks of dimensionality explosion.

How to eliminate wrong answers

Option A is wrong because one-hot encoding high-cardinality features (e.g., thousands of unique postal codes) creates an extremely sparse feature matrix with many columns, leading to increased memory usage, slower training, and potential overfitting in tree-based models. Option C is wrong because target encoding, while effective for high-cardinality features, introduces target leakage and can cause overfitting if not carefully regularized, making it less robust than label encoding for tree-based models in a straightforward SageMaker training pipeline. Option D is wrong because binary encoding, though more compact than one-hot, still creates multiple binary columns per feature and can complicate interpretability; tree-based models can handle label encoding directly without needing this transformation.

200
MCQeasy

A team is training a linear regression model to predict house prices. After training, they observe that the model has high bias (underfitting). Which action is most likely to reduce bias?

A.Increase the regularization strength.
B.Reduce the amount of training data.
C.Decrease the number of model parameters.
D.Add more relevant features and increase model complexity.
AnswerD

Adding features reduces bias.

Why this answer

High bias (underfitting) means the model is too simple to capture the underlying patterns in the data. Adding more relevant features and increasing model complexity (e.g., using polynomial features or more interaction terms) gives the linear regression model greater capacity to fit the training data, directly reducing bias. This aligns with the bias-variance tradeoff, where increasing complexity lowers bias at the cost of potentially increasing variance.

Exam trap

The trap here is that candidates often confuse regularization (which controls overfitting) with bias reduction, mistakenly thinking increasing regularization or reducing parameters will fix underfitting, when in fact those actions increase bias.

How to eliminate wrong answers

Option A is wrong because increasing regularization strength (e.g., L1 or L2 penalty) forces the model to shrink coefficients toward zero, which increases bias and worsens underfitting. Option B is wrong because reducing the amount of training data does not address model simplicity; it typically increases variance and can exacerbate bias if the model cannot learn the true distribution. Option C is wrong because decreasing the number of model parameters (e.g., removing features or using a simpler model) reduces complexity, which directly increases bias and makes underfitting worse.

201
MCQmedium

A data scientist is using Amazon SageMaker to train a natural language processing model using a custom Docker container. The training script reads data from an S3 bucket and writes checkpoints to an S3 bucket. The training job is failing with the error 'Unable to write to checkpoint path: s3://my-bucket/checkpoints/'. The IAM role associated with the training job has the following policy: {'Effect': 'Allow', 'Action': 's3:PutObject', 'Resource': 'arn:aws:s3:::my-bucket/checkpoints/*'}. The bucket 'my-bucket' exists and the prefix 'checkpoints/' is empty. What is the most likely cause of the failure?

A.The IAM role is missing the s3:ListBucket permission
B.The IAM role does not have s3:PutObject permission
C.The S3 bucket does not exist
D.The checkpoint prefix already contains objects
AnswerA

SageMaker needs ListBucket to access the bucket.

Why this answer

The error 'Unable to write to checkpoint path' occurs because the SageMaker training job's IAM role lacks the `s3:ListBucket` permission. Even though the role has `s3:PutObject` on the checkpoint prefix, SageMaker's S3 client first performs a `ListObjects` (or `HeadObject`) call to verify the bucket exists and to check the prefix state before writing. Without `s3:ListBucket` on the bucket itself, the API call fails, causing the write operation to abort.

Exam trap

The trap here is that candidates assume `s3:PutObject` alone is sufficient for writing to S3, but AWS requires `s3:ListBucket` on the bucket to verify the path before writing, a nuance frequently tested in MLS-C01 and SAA exams.

How to eliminate wrong answers

Option B is wrong because the policy explicitly includes `s3:PutObject` on the checkpoint path, so the permission is present. Option C is wrong because the question states the bucket 'my-bucket' exists, so the bucket is not missing. Option D is wrong because the prefix is explicitly described as empty, and even if it contained objects, `s3:PutObject` would still succeed; the error is about the inability to write, not about overwriting existing objects.

202
MCQmedium

A company uses SageMaker to host a real-time inference endpoint for a classification model. The endpoint receives traffic spikes that cause high latency. The team wants a solution that automatically scales based on demand while keeping costs low. Which approach is BEST?

A.Use provisioned concurrency for the endpoint
B.Use a multi-model endpoint to serve multiple models
C.Deploy the endpoint on Spot Instances
D.Enable automatic scaling on the endpoint using Application Auto Scaling
AnswerD

Automatic scaling adjusts instance count based on demand, balancing cost and latency.

Why this answer

SageMaker endpoints support automatic scaling with Application Auto Scaling based on custom metrics like 'InvocationsPerInstance' or 'SageMakerVariantInvocationsPerInstance'. Provisioned concurrency is not available for SageMaker endpoints. Spot instances are not recommended for real-time endpoints due to interruptions.

Multi-model endpoints help but scaling is still needed.

203
Multi-Selecthard

A machine learning engineer is tuning a Gradient Boosting model for a regression task. The dataset contains 50 features and 100,000 samples. The engineer wants to speed up training without sacrificing predictive performance significantly. Which THREE hyperparameters should the engineer consider adjusting? (Choose THREE.)

Select 3 answers
A.Reduce the subsample ratio (e.g., from 1.0 to 0.5)
B.Increase learning_rate and decrease n_estimators proportionally
C.Increase the number of estimators
D.Decrease max_depth of trees
E.Reduce max_features (e.g., from 'auto' to 0.5)
AnswersA, D, E

Using fewer samples per tree speeds training.

Why this answer

(subsample) uses a fraction of samples per tree, reducing both overfitting and training time. Option D (max_depth) limits tree depth, which directly reduces computation. Option E (max_features) restricts the number of features considered for each split, lowering tree complexity.

Option B (learning_rate and n_estimators) trades off; although increasing learning rate can reduce training time, it often requires careful adjustment and may hurt performance. Option C (n_estimators) directly increases training time, which is the opposite of the goal.

204
MCQhard

A research team is training a deep learning model for object detection using SageMaker's built-in SSD algorithm. The dataset contains 50,000 images with bounding box annotations. The team uses a single ml.p3.2xlarge instance. After 24 hours of training, the model's loss has plateaued, but the mean average precision (mAP) on validation is only 0.45. The team wants to improve mAP without increasing training time. Which action should they take?

A.Increase the learning rate by a factor of 2
B.Use a pre-trained model as the backbone (e.g., ResNet-50 pre-trained on ImageNet)
C.Increase the batch size to 64
D.Add more convolutional layers to the backbone
AnswerB

Transfer learning boosts accuracy with no additional training time.

Why this answer

(use a pre-trained backbone) transfers learned features, often improving accuracy. Option A (increase learning rate) may destabilize training. Option C (increase batch size) may not improve mAP and could slow convergence.

Option D (add more layers) increases training time.

205
MCQmedium

A machine learning team is using SageMaker to train a deep learning model. The training job is failing due to insufficient GPU memory. Which approach should the team take to resolve this issue without changing the model architecture?

A.Increase the batch size.
B.Use gradient accumulation to reduce the effective batch size per step.
C.Add more GPUs to the training instance.
D.Decrease the learning rate.
AnswerB

Gradient accumulation allows training with larger effective batches while keeping per-step memory low.

Why this answer

Gradient accumulation allows the model to simulate a larger batch size without increasing memory usage per step, as gradients are accumulated over several smaller batches before updating weights. Option A is wrong because increasing the batch size would increase memory consumption per step, exacerbating the issue. Option C (adding more GPUs) is wrong because simply adding more GPUs to the instance does not reduce the memory usage per GPU; each GPU would still process the same batch size and run out of memory.

Option D is wrong because decreasing the learning rate does not affect memory usage; it only changes the step size during optimization.

206
MCQmedium

A company wants to deploy a machine learning model that predicts customer churn. The model must provide interpretable predictions to explain why a customer is likely to churn. Which algorithm is most appropriate?

A.Gradient boosting machine
B.Support vector machine (SVM)
C.Decision tree
D.Deep neural network
AnswerC

Decision trees are highly interpretable.

Why this answer

Decision trees are inherently interpretable because they produce a clear, rule-based structure that shows exactly which features and thresholds lead to a churn prediction. This white-box nature allows stakeholders to trace the reasoning for each prediction, meeting the requirement for interpretability without needing post-hoc explanation methods.

Exam trap

The MLS-C01 exam often tests the trade-off between model accuracy and interpretability, where candidates mistakenly choose a high-performance black-box model (like gradient boosting or neural networks) without recognizing that the question explicitly prioritizes interpretability over raw predictive power.

How to eliminate wrong answers

Option A is wrong because gradient boosting machines are ensemble models that combine many weak learners, making them highly accurate but difficult to interpret directly; they require techniques like SHAP or LIME for explanation, which adds complexity. Option B is wrong because support vector machines operate in high-dimensional feature spaces using kernel functions, producing decision boundaries that are not easily interpretable without additional tools. Option D is wrong because deep neural networks are black-box models with multiple hidden layers and non-linear transformations, making their predictions opaque and requiring external interpretability methods.

207
Multi-Selecthard

A data scientist is training a random forest model for regression. The model shows high variance on the validation set. Which TWO actions are most likely to reduce variance? (Choose 2.)

Select 2 answers
A.Use bootstrap sampling with replacement
B.Decrease the maximum depth of trees
C.Increase the minimum samples per leaf
D.Increase the number of trees in the forest
E.Increase the number of features considered at each split
AnswersB, C

Shallow trees reduce overfitting, lowering variance.

Why this answer

Both decreasing the maximum depth of trees (B) and increasing the minimum samples per leaf (C) reduce the complexity of individual trees. Decreasing max depth limits tree growth, preventing overfitting to noise. Increasing min samples per leaf forces leaves to contain more samples, smoothing predictions and reducing variance.

Together, these regularization techniques directly combat high variance in random forest models.

Exam trap

The MLS-C01 exam often tests the misconception that adding more trees always reduces variance, but the trap here is that while more trees reduce variance from averaging, they do not address the root cause of overfitting from overly complex individual trees.

208
MCQeasy

A machine learning team is training a deep learning model on Amazon SageMaker and notices that the training loss is decreasing but the validation loss is increasing. What is the most likely cause?

A.Vanishing gradients
B.Overfitting the training data
C.Learning rate is too high
D.Underfitting the training data
AnswerB

Overfitting occurs when model learns noise, causing validation loss to increase after a point.

Why this answer

When training loss continues to decrease while validation loss increases, the model is memorizing the training data rather than learning generalizable patterns. This is the classic symptom of overfitting, where the model's capacity exceeds what is needed for the underlying data distribution, causing it to fit noise in the training set. In Amazon SageMaker, this can be observed by monitoring the validation loss metric during training jobs.

Exam trap

The MLS-C01 exam often tests the distinction between overfitting and high learning rate by presenting a scenario where training loss decreases but validation loss increases, and candidates mistakenly attribute it to a learning rate that is too high, not recognizing that a high learning rate would cause both losses to diverge or oscillate.

How to eliminate wrong answers

Option A is wrong because vanishing gradients cause the model to stop learning entirely, resulting in both training and validation loss stagnating or decreasing very slowly, not a divergence between the two. Option C is wrong because a learning rate that is too high typically causes the loss to oscillate or diverge on both training and validation sets, not a monotonic decrease in training loss with an increase in validation loss. Option D is wrong because underfitting means the model is too simple to capture patterns, leading to high loss on both training and validation sets, not a decreasing training loss.

209
MCQhard

A data scientist is troubleshooting a failed SageMaker training job that uses a custom Docker image. The failure reason shows 'unrecognized arguments: --sagemaker_program'. What is the most likely cause?

A.The Docker image is tagged incorrectly and cannot be pulled
B.The training job is in a different region than the ECR repository
C.The input mode is File mode, but the container expects Pipe mode
D.The custom Docker image does not use the SageMaker training toolkit and thus does not accept SageMaker hyperparameters
AnswerD

Custom containers that are not toolkit-based ignore SageMaker hyperparameters, causing unrecognized argument errors if the entry point tries to parse them.

Why this answer

The error 'unrecognized arguments: --sagemaker_program' indicates that the custom Docker image does not include the SageMaker Training Toolkit. The SageMaker Training Toolkit is a Python library that provides a default entry point to parse and handle SageMaker-specific hyperparameters (like --sagemaker_program, --sagemaker_submit_directory, etc.). Without this toolkit, the container's entry point does not recognize these arguments, causing the training job to fail.

Exam trap

The trap here is that candidates often confuse container-level errors (like pull failures or region mismatches) with argument parsing errors, failing to recognize that the SageMaker Training Toolkit is required to handle SageMaker-specific CLI arguments.

How to eliminate wrong answers

Option A is wrong because if the Docker image were tagged incorrectly or could not be pulled, the error would be an ECR pull failure (e.g., 'CannotPullContainerError' or 'RepositoryNotFoundException'), not an argument parsing error. Option B is wrong because a region mismatch between the training job and the ECR repository would result in a 'RepositoryNotFoundException' or access denied error, not an unrecognized argument error. Option C is wrong because the input mode (File vs.

Pipe) affects how data is ingested (e.g., via SM_INPUT_FILE or SM_INPUT_PIPE environment variables), but it does not affect the parsing of command-line hyperparameters like --sagemaker_program.

210
Multi-Selecthard

A company is deploying a machine learning model on SageMaker for real-time inference. The model requires GPU for low latency. Which THREE steps are necessary to set up the endpoint?

Select 3 answers
A.Train the model using a SageMaker training job
B.Create a SageMaker batch transform job
C.Create a SageMaker model object that points to the S3 bucket containing the model artifacts and the inference container image
D.Create an endpoint configuration specifying the instance type (e.g., ml.p3.2xlarge) and initial instance count
E.Create a SageMaker endpoint using the endpoint configuration
AnswersC, D, E

A model object is required to deploy an endpoint.

Why this answer

To deploy a model for real-time inference on SageMaker, you must first create a SageMaker model object that references the model artifacts stored in S3 and the inference container image (e.g., a GPU-enabled Docker image). This object is the foundational resource that SageMaker uses to launch instances for serving predictions.

Exam trap

The MLS-C01 exam often tests the distinction between batch transform and real-time endpoints, and candidates mistakenly think a batch transform job is required for deploying a real-time endpoint, but it is only for offline inference.

211
MCQhard

Refer to the exhibit. A data scientist is trying to run a SageMaker training job using a script that reads training data from 's3://my-bucket/training/data.csv'. The job fails with an access denied error. What is the MOST likely reason?

A.The S3 bucket policy may deny access, or the IAM role lacks necessary permissions beyond GetObject.
B.The training job is running in a VPC without S3 VPC endpoint.
C.The sagemaker:CreateTrainingJob action is not allowed on the specific resource.
D.The S3 path is incorrectly formatted.
AnswerA

Common reason: the training script may need to list the bucket or access other prefixes, or a bucket policy denies the request.

Why this answer

The most likely reason for the access denied error is that the S3 bucket policy may deny access, or the IAM role used by SageMaker lacks the necessary permissions beyond s3:GetObject. The script reads from a specific path, but the role might not have permissions to list the bucket or access other required objects. Option B is incorrect because the error is about access denied, not VPC endpoint configuration.

Option C is incorrect because the CreateTrainingJob action is allowed. Option D is incorrect because the S3 path is correctly formatted.

212
Multi-Selecthard

Which THREE of the following are appropriate methods to reduce overfitting in a decision tree model?

Select 3 answers
A.Increase the number of features considered for each split
B.Increase the maximum depth of the tree
C.Prune the tree after training
D.Set a minimum number of samples required to split an internal node
E.Limit the maximum depth of the tree
AnswersC, D, E

Pruning the tree after training removes branches that have little predictive power, reducing complexity and helping to generalize better, which reduces overfitting.

Why this answer

To reduce overfitting in a decision tree, we aim to decrease model complexity. Pruning the tree after training (C) removes branches that have little predictive power, thus simplifying the model. Setting a minimum number of samples required to split an internal node (D) prevents the tree from learning overly specific patterns from small subsets.

Limiting the maximum depth of the tree (E) restricts the number of splits, reducing complexity. On the other hand, increasing the number of features considered for each split (A) can make the tree more prone to overfitting by including more irrelevant features, and increasing the maximum depth (B) allows the tree to grow deeper and capture noise, both of which increase overfitting.

213
MCQeasy

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

A.0.85
B.0.80
C.0.89
D.0.90
AnswerB

Recall = 80/(80+20) = 0.80.

Why this answer

Recall is calculated as True Positives divided by the sum of True Positives and False Negatives. From the confusion matrix, True Positives = 80 and False Negatives = 20, so recall = 80 / (80 + 20) = 0.80. Option B is correct.

Exam trap

The MLS-C01 exam often tests the distinction between recall and precision, where candidates mistakenly compute precision (TP/(TP+FP)) instead of recall, leading to option A (0.85).

How to eliminate wrong answers

Option A (0.85) is wrong because it incorrectly uses True Positives divided by the sum of True Positives and False Positives (80/94 ≈ 0.85), which is precision, not recall. Option C (0.89) is wrong because it likely results from dividing True Positives by the total number of predictions (80/90 ≈ 0.89), which is accuracy. Option D (0.90) is wrong because it might come from dividing True Positives by the sum of True Positives and False Positives plus False Negatives (80/100 = 0.80, not 0.90), or from a miscalculation such as using True Negatives incorrectly.

214
MCQmedium

A data scientist is building a recommendation system for an e-commerce platform. The dataset includes user-item interactions (clicks, purchases, ratings). The scientist wants to use matrix factorization. Which approach is most appropriate for handling implicit feedback (e.g., clicks) rather than explicit ratings?

A.Use k-means clustering to segment users and then use item popularity within clusters
B.Use singular value decomposition (SVD) on the interaction matrix with missing values filled with 0
C.Use a deep neural network with a softmax output to predict item probabilities
D.Use weighted alternating least squares (WALS) with confidence weights
AnswerD

WALS is specifically designed for implicit feedback by assigning confidence to observed and unobserved interactions.

Why this answer

Weighted Alternating Least Squares (WALS) is specifically designed for implicit feedback scenarios because it treats unobserved interactions as negative signals with low confidence, rather than missing values. By assigning confidence weights (e.g., based on click frequency or dwell time), WALS can factorize the implicit feedback matrix effectively, avoiding the bias introduced by treating all zeros as true negatives.

Exam trap

The trap here is that candidates often assume SVD (Option B) is the standard matrix factorization method, but they overlook that SVD requires a complete matrix and treats zeros as missing, which is invalid for implicit feedback where zeros carry meaning.

How to eliminate wrong answers

Option A is wrong because k-means clustering followed by item popularity ignores the collaborative signal between users and items, and does not learn latent factors that capture nuanced preferences. Option B is wrong because SVD requires a dense matrix and assumes missing values are zero, which is inappropriate for implicit feedback where zeros can mean either no interaction or negative preference, leading to poor factorization. Option C is wrong because while a deep neural network with softmax can predict item probabilities, it is not the most appropriate or efficient approach for implicit feedback matrix factorization; WALS is a simpler, proven method that directly handles the implicit feedback structure without overfitting or requiring extensive hyperparameter tuning.

215
MCQhard

A data scientist is using Amazon SageMaker Autopilot to automatically build a model for a regression problem. The dataset has 100 features and 50,000 rows. Autopilot recommends a model with an R² of 0.85 on the validation set. However, when deployed to production, the model performs poorly (R² of 0.2). What is the most likely cause?

A.The model is overfitting to the training data
B.The production data distribution has shifted from the training data distribution
C.The model is underfitting due to insufficient training
D.Autopilot selected the wrong features
AnswerB

Data drift causes model performance to degrade in production.

Why this answer

A large discrepancy between validation and production performance often indicates data drift. Option A (overfitting) is possible but less likely given validation performance. Option C (feature importance) is not the direct cause.

Option D (Autopilot bug) is rare.

216
MCQeasy

A company uses SageMaker to deploy a model for predicting customer churn. The model was trained on historical data and achieves 85% accuracy on the test set. After deployment, the model's predictions are significantly worse on new data due to changes in customer behavior. What is the MOST likely cause?

A.Data leakage during training
B.The training dataset was too small
C.Concept drift in the underlying data distribution
D.The model is overfitting to the training data
AnswerC

Changes in customer behavior cause concept drift, reducing model accuracy over time.

Why this answer

The model's performance degradation on new data, despite high accuracy on the test set, is a classic symptom of concept drift. Concept drift occurs when the statistical properties of the target variable (customer churn) change over time due to shifts in customer behavior, making the trained model's decision boundary obsolete. SageMaker deployed the model as a persistent endpoint, but the underlying data distribution has evolved, so the model no longer generalizes to the current environment.

Exam trap

The trap here is that candidates confuse concept drift with overfitting, assuming any performance drop after deployment must be due to the model memorizing noise, but the key differentiator is the temporal nature of the degradation tied to changing customer behavior, not a static training-data issue.

How to eliminate wrong answers

Option A is wrong because data leakage would inflate test set accuracy artificially, but the model would fail immediately on new data—not after a period of deployment—and the scenario describes a gradual change in customer behavior, not a training flaw. Option B is wrong because a small training dataset typically causes high bias or variance, leading to poor accuracy on both test and new data, whereas here the model initially achieved 85% accuracy on the test set. Option D is wrong because overfitting would cause poor performance on the test set (not 85% accuracy) and would not explain a delayed degradation tied to changing customer behavior; overfitting is a static issue, not a temporal one.

217
MCQhard

A machine learning team is building a recommendation system for an e-commerce platform. They have user-item interaction data (clicks, purchases). They need to choose an algorithm that can capture both user and item latent factors and handle missing data. Which algorithm should they use?

A.Linear regression
B.Principal component analysis (PCA)
C.Matrix factorization
D.Convolutional neural network (CNN)
AnswerC

Matrix factorization learns latent factors and handles missing data.

Why this answer

Matrix factorization is the correct choice because it decomposes the user-item interaction matrix into lower-dimensional latent factors for users and items, capturing underlying patterns in preferences. It naturally handles missing data by learning from observed interactions only, making it ideal for recommendation systems with sparse data.

Exam trap

The trap here is that candidates may choose PCA because it also performs dimensionality reduction, but PCA cannot handle missing data or model user-item interactions for collaborative filtering, which is the core requirement of the question.

How to eliminate wrong answers

Option A is wrong because linear regression models a continuous target variable from features but cannot capture latent factors or handle missing data in a user-item matrix. Option B is wrong because PCA is an unsupervised dimensionality reduction technique that does not model user-item interactions or handle missing data; it requires a complete matrix and ignores the collaborative filtering structure. Option D is wrong because CNNs are designed for spatial data like images and are not suited for collaborative filtering or latent factor extraction from sparse interaction matrices.

218
MCQeasy

A data scientist is training a binary classification model on imbalanced data (95% negative, 5% positive). The model achieves 95% accuracy but only 10% recall on the positive class. Which metric should be used to evaluate model performance?

A.F1 score
B.Accuracy
C.Recall
D.Precision
AnswerA

F1 score is the harmonic mean of precision and recall. It is appropriate for imbalanced datasets because it balances both metrics.

Why this answer

With imbalanced data (95% negative, 5% positive), accuracy is high despite poor positive class performance. The F1 score (harmonic mean of precision and recall) is a better metric because it captures both false positives and false negatives. Here, recall is only 10%, so even if precision is high, F1 score will be low, reflecting poor model quality.

219
MCQmedium

A company is using Amazon SageMaker to deploy a model for real-time inference. The model receives requests that are small but arrive in bursts. The data scientist wants to minimize latency and cost. Which deployment option is MOST appropriate?

A.Use a real-time endpoint with a single instance
B.Use a multi-model endpoint with auto-scaling
C.Use Amazon SageMaker Serverless Inference
D.Use a batch transform job triggered by a schedule
AnswerC

Serverless scales automatically and you pay only for inference duration.

Why this answer

Amazon SageMaker Serverless Inference is the most appropriate option because it automatically scales compute resources based on request volume, charges only for the compute time used during inference (per-millisecond billing), and has no idle costs. This matches the bursty, small-request pattern perfectly, minimizing both latency and cost without requiring manual instance management.

Exam trap

The trap here is that candidates often confuse 'multi-model endpoints' with 'serverless' and assume auto-scaling eliminates idle costs, but multi-model endpoints still require a minimum number of running instances, incurring continuous charges.

How to eliminate wrong answers

Option A is wrong because a single-instance real-time endpoint incurs continuous hourly costs even when idle, and cannot handle burst traffic without significant latency or throttling. Option B is wrong because a multi-model endpoint with auto-scaling still requires at least one running instance at all times, leading to idle costs and slower scaling compared to serverless. Option D is wrong because batch transform jobs are designed for offline, asynchronous processing of large datasets, not real-time inference, and cannot meet low-latency requirements.

220
MCQmedium

A team is training a deep learning model on Amazon SageMaker. The training job is slow because the data is stored in S3 as many small files. Which approach is MOST effective to improve training throughput?

A.Use SageMaker Pipe mode for training input
B.Increase the number of ml.c5.xlarge instances
C.Shuffle the S3 objects to randomize order
D.Use Amazon EFS instead of S3
AnswerA

Pipe mode streams data directly, avoiding the need to download all files first, improving throughput.

Why this answer

Using SageMaker Pipe mode streams data directly from S3, reducing startup time. Shuffling files or increasing instance count does not address the small file overhead. Using EFS would introduce latency.

221
Multi-Selecthard

A data scientist is developing a deep learning model for object detection using Amazon SageMaker. The training dataset has 50,000 labeled images. The data scientist wants to improve model generalization without collecting more data. Which TWO techniques can be applied? (Choose two.)

Select 2 answers
A.Increase the learning rate to speed up convergence.
B.Increase the number of training epochs to ensure convergence.
C.Apply data augmentation techniques such as random cropping and horizontal flipping.
D.Use transfer learning from a pre-trained model on ImageNet.
E.Increase the batch size to reduce variance.
AnswersC, D

Data augmentation increases data diversity without new data.

Why this answer

Data augmentation techniques like random cropping and horizontal flipping artificially expand the training dataset by generating modified versions of existing images. This exposes the model to more varied input patterns, reducing overfitting and improving generalization without requiring new labeled data.

Exam trap

The trap here is that candidates may confuse techniques that improve training speed or convergence (like increasing learning rate or epochs) with those that improve generalization, failing to recognize that overfitting is the core issue when data is limited.

222
Multi-Selectmedium

A data scientist is building a text classification model using a bag-of-words approach with logistic regression. The dataset has 10,000 documents and 50,000 unique tokens. The model overfits. Which TWO techniques can help reduce overfitting?

Select 2 answers
A.Increase the number of n-grams features
B.Use one-hot encoding instead of bag-of-words
C.Use a more complex model such as a neural network
D.Reduce the vocabulary size by removing rare and very frequent terms
E.Apply L2 regularization to the logistic regression model
AnswersD, E

Reducing the number of features reduces model complexity and overfitting.

Why this answer

Removing rare and very frequent terms reduces the feature space and eliminates noise, which helps the logistic regression model generalize better. Rare terms often act as noise that the model can latch onto for spurious correlations, while very frequent terms (like stopwords) provide little discriminative power. This dimensionality reduction directly combats overfitting by simplifying the model.

Exam trap

AWS often tests the misconception that adding more features or using a more complex model always improves performance, when in fact these actions increase overfitting risk in high-dimensional sparse datasets.

223
MCQhard

A machine learning team is deploying a time-series forecasting model using Amazon SageMaker. The model is trained on historical data and needs to be updated daily with new data. The team wants to automate the retraining pipeline and avoid manual intervention. Which approach is the most efficient?

A.Use AWS Step Functions to orchestrate retraining, but require a manual approval step.
B.Use SageMaker training jobs manually triggered by the team each day.
C.Use a cron job on an EC2 instance to run a training script.
D.Use Amazon SageMaker Pipelines with a scheduled Lambda function to trigger retraining daily.
AnswerD

Combines SageMaker Pipelines for automated ML workflows with Lambda for scheduling, providing a fully automated solution.

Why this answer

Amazon SageMaker Pipelines provides a fully managed, end-to-end orchestration service for building, training, and deploying machine learning models. By combining it with a scheduled AWS Lambda function, the team can automate daily retraining without manual intervention, leveraging SageMaker's native integration for step sequencing, artifact tracking, and model registry updates.

Exam trap

The trap here is that candidates might choose Option C (cron job on EC2) because it seems simpler, but they overlook the operational burden of managing EC2 and the lack of native SageMaker integration for model lineage and automated deployment.

How to eliminate wrong answers

Option A is wrong because requiring a manual approval step contradicts the requirement to avoid manual intervention, making the pipeline not fully automated. Option B is wrong because manually triggering training jobs each day is the opposite of automation and introduces human error and operational overhead. Option C is wrong because using a cron job on an EC2 instance requires managing the instance (patching, scaling, security), and the training script would lack native integration with SageMaker's managed infrastructure, model registry, and pipeline lineage tracking.

224
Multi-Selectmedium

Which TWO of the following are best practices for training deep learning models on Amazon SageMaker? (Select TWO.)

Select 2 answers
A.Use SageMaker Processing to perform data augmentation before training.
B.Use Pipe input mode to stream data directly from S3 to the algorithm.
C.Store training data on Amazon EBS volumes attached to the training instance.
D.Use managed spot training to reduce costs.
E.Disable checkpointing to improve training speed.
AnswersB, D

Pipe mode reduces startup time and storage.

Why this answer

SageMaker's Pipe input mode streams training data directly from Amazon S3 to the algorithm without writing it to disk, reducing I/O latency and eliminating the need for large local storage. This is especially beneficial for deep learning models that iterate over large datasets, as it allows training to start faster and avoids the overhead of downloading data to EBS volumes.

Exam trap

The trap here is that candidates often confuse SageMaker Processing with a general-purpose compute environment for any training task, when in fact it is specifically for data processing jobs, not for augmenting data during model training.

225
MCQhard

A company is building a recommendation system using Amazon SageMaker's Factorization Machines algorithm. The dataset includes user IDs, item IDs, and ratings. The data is sparse. Which data format should be used for training?

A.CSV format with one row per rating.
B.JSON lines format with nested structures.
C.RecordIO-protobuf format with sparse feature vectors.
D.Parquet format with columns for each feature.
AnswerC

Protobuf with sparse encoding is efficient and recommended.

Why this answer

Factorization Machines (FM) in SageMaker are optimized for sparse, high-dimensional data. The RecordIO-protobuf format allows you to directly specify sparse feature vectors using integer keys and float values, which avoids the memory overhead of dense representations and enables efficient distributed training. This format is the recommended input for SageMaker's built-in FM algorithm.

Exam trap

The trap here is that candidates assume CSV is always the simplest and most compatible format, overlooking the fact that SageMaker's Factorization Machines specifically require sparse data representation for performance and correctness, making RecordIO-protobuf the only optimal choice among the options.

How to eliminate wrong answers

Option A is wrong because CSV format with one row per rating forces dense representation, which is inefficient for sparse data and does not leverage FM's native support for sparse feature vectors. Option B is wrong because JSON lines format with nested structures is not natively supported by SageMaker's Factorization Machines; the algorithm expects RecordIO-protobuf or CSV with a specific schema, not arbitrary nested JSON. Option D is wrong because Parquet format, while efficient for columnar storage, is not directly supported by SageMaker's FM algorithm and would require conversion to RecordIO-protobuf or CSV for training.

← PreviousPage 3 of 9 · 603 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Ml Modeling questions.