Courseiva

CCNA Ml Modeling Questions

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

376
MCQeasy

A machine learning engineer is training a linear regression model on a dataset with 50 features. After training, the model achieves high accuracy on the training set but poor accuracy on the test set. Which technique should the engineer use to address this issue?

A.Train a deeper neural network with more layers
B.Add more features through feature engineering
C.Apply L1 or L2 regularization
D.Increase the size of the training dataset
AnswerC

Regularization penalizes large coefficients and reduces overfitting.

Why this answer

The model exhibits overfitting: high training accuracy but poor test accuracy. L1 (Lasso) or L2 (Ridge) regularization penalizes large coefficients, reducing model complexity and improving generalization. This directly addresses the variance problem without requiring more data or features.

Exam trap

AWS often tests the distinction between overfitting and underfitting, and the trap here is that candidates may think adding more data (Option D) is the universal fix for overfitting, when in fact regularization is the most direct and efficient solution for a model with high variance.

How to eliminate wrong answers

Option A is wrong because training a deeper neural network would increase model capacity and likely worsen overfitting, not fix it. Option B is wrong because adding more features through feature engineering would increase dimensionality and exacerbate overfitting, not reduce it. Option D is wrong because increasing the training dataset size can help reduce overfitting, but it is not the most direct or practical fix; regularization is a more immediate and targeted technique for this specific symptom.

377
MCQhard

A data scientist is tuning a linear regression model and observes that the model has high bias and low variance. Which action is most likely to improve model performance?

A.Reduce the number of features
B.Increase regularization
C.Add more features
D.Reduce the amount of training data
AnswerC

Increases complexity, reducing bias.

Why this answer

High bias and low variance indicate underfitting, meaning the model is too simple to capture the underlying patterns in the data. Adding more features increases model complexity, allowing it to learn more relevant relationships and reduce bias. This directly addresses the core issue of underfitting in linear regression.

Exam trap

AWS often tests the bias-variance tradeoff by presenting high bias (underfitting) and high variance (overfitting) scenarios, and the trap here is that candidates mistakenly choose to increase regularization or reduce features, which are remedies for overfitting, not underfitting.

How to eliminate wrong answers

Option A is wrong because reducing the number of features further simplifies the model, which would increase bias and worsen underfitting. Option B is wrong because increasing regularization penalizes model coefficients more heavily, reducing complexity and increasing bias, which is the opposite of what is needed. Option D is wrong because reducing the amount of training data typically increases variance (overfitting risk) and does not address the high bias problem; it may also degrade the model's ability to learn generalizable patterns.

378
MCQeasy

A machine learning engineer needs to deploy a model that makes real-time predictions with latency under 100ms. The model is a small ensemble of decision trees. Which AWS service is MOST suitable?

A.Amazon EMR with Spark Streaming
B.AWS Glue
C.Amazon SageMaker endpoint
D.AWS Lambda with custom container
AnswerC

SageMaker endpoints are designed for real-time inference with low latency.

Why this answer

Amazon SageMaker provides real-time endpoints with low latency for model inference, and can host the ensemble as a single endpoint.

379
MCQhard

A data scientist is tuning hyperparameters for an XGBoost model on a large dataset using Amazon SageMaker. The training job is taking too long, and they want to speed up the tuning process. Which strategy is most effective?

A.Use Bayesian optimization
B.Use grid search with a fine-grained grid
C.Use random search with more iterations
D.Reduce the max depth of trees
AnswerA

Bayesian optimization is more efficient.

Why this answer

Bayesian optimization uses results from previous hyperparameter evaluations to choose the next set, reducing the number of training jobs needed to find optimal hyperparameters. This is especially efficient for large datasets where each training job is expensive. Option B (grid search) is exhaustive and slow for many hyperparameters.

Option C (random search) is faster but does not learn from past trials. Option D (reducing max depth) may speed up individual jobs but risks underfitting and does not improve the tuning process itself.

380
Multi-Selectmedium

A data scientist is training a classification model on a dataset with missing values in several features. The data scientist wants to use SageMaker to train the model. Which TWO approaches can the data scientist use to handle missing data within the SageMaker training pipeline? (Choose two.)

Select 2 answers
A.Use the SageMaker built-in XGBoost algorithm, which can handle missing values by default.
B.Use the SageMaker BlazingText algorithm, which automatically imputes missing values.
C.Use SageMaker Inference Pipeline to handle missing values at inference time.
D.Use SageMaker Processing to run a custom Python script that imputes missing values before training.
E.Use SageMaker PCA algorithm, which automatically handles missing values.
AnswersA, D

XGBoost has built-in support for missing values.

Why this answer

The SageMaker built-in XGBoost algorithm has a built-in mechanism to handle missing values by default. It learns the best direction (left or right branch) to route missing values during training, so no explicit imputation is needed. This makes it a seamless choice for datasets with missing data within the SageMaker training pipeline.

Exam trap

The trap here is that candidates often assume all SageMaker built-in algorithms automatically handle missing values, but only XGBoost does; BlazingText and PCA require complete data, and Inference Pipeline is for serving, not training.

381
MCQhard

An e-commerce company uses a linear regression model to predict customer lifetime value (LTV). The model shows high variance on the test set, with training RMSE much lower than test RMSE. Which of the following is the MOST effective approach to reduce overfitting?

A.Apply L2 regularization (Ridge regression)
B.Use a polynomial kernel in a support vector regressor
C.Add more features, including interaction terms
D.Increase training data size by duplicating existing samples
AnswerA

L2 regularization shrinks coefficients and reduces variance.

Why this answer

High variance (low training RMSE, high test RMSE) indicates overfitting. L2 regularization (Ridge regression) adds a penalty proportional to the square of the coefficients, shrinking them toward zero without eliminating them, which reduces model complexity and improves generalization. This directly addresses overfitting by constraining the model's sensitivity to noise in the training data.

Exam trap

The MLS-C01 exam often tests the misconception that adding more data always reduces overfitting, but the trap here is that duplicating existing samples (Option D) does not provide new, diverse examples and therefore fails to address the root cause of high variance.

How to eliminate wrong answers

Option B is wrong because using a polynomial kernel in a support vector regressor increases model complexity by mapping data into a higher-dimensional space, which would exacerbate overfitting rather than reduce it. Option C is wrong because adding more features, including interaction terms, further increases model complexity and variance, making overfitting worse. Option D is wrong because duplicating existing samples does not introduce new information; it artificially inflates the weight of existing patterns, which can actually increase overfitting by reinforcing noise in the training data.

382
Multi-Selecthard

A data scientist is training a deep learning model using Amazon SageMaker. The training loss is decreasing, but the validation loss starts increasing after 10 epochs. The model is overfitting. Which TWO actions should the data scientist take to reduce overfitting? (Choose 2.)

Select 2 answers
A.Increase the number of layers
B.Remove L2 regularization
C.Increase the number of training steps
D.Add dropout layers
E.Add early stopping based on validation loss
AnswersD, E

Dropout regularizes by randomly dropping neurons.

Why this answer

Dropout layers randomly deactivate a fraction of neurons during training, which forces the network to learn more robust features and reduces co-adaptation, a common cause of overfitting. This technique is particularly effective in deep learning models trained on SageMaker, where large architectures can quickly memorize training data.

Exam trap

The trap here is that candidates often confuse regularization techniques that reduce overfitting (dropout, L2, early stopping) with actions that increase model capacity (more layers, more steps), leading them to select options that would worsen the problem.

383
MCQmedium

A company uses Amazon SageMaker to train a model for detecting fraudulent transactions. The dataset is highly imbalanced (99.9% legitimate, 0.1% fraudulent). Which approach is most effective to address this imbalance?

A.Use class weights in the loss function
B.Apply SMOTE to generate synthetic samples
C.Random oversampling of the minority class
D.Collect more data for the minority class
AnswerB

SMOTE generates synthetic samples to balance the dataset.

Why this answer

SMOTE (Synthetic Minority Over-sampling Technique) generates synthetic samples for the minority class, effectively balancing the dataset without causing overfitting. Option A is less effective because while class weights can help, they do not increase the number of training examples for the minority class. Option C is wrong because random oversampling duplicates existing samples, which can lead to overfitting.

Option D is not always feasible or effective as collecting more data may not be possible and does not guarantee balance.

384
MCQmedium

A team deployed a SageMaker endpoint with the configuration shown in the exhibit. During a traffic spike, the endpoint becomes unresponsive. Which change to the endpoint configuration would best improve availability?

A.Reduce the initial instance count to 0 and use on-demand invocation
B.Add a second production variant with the same model
C.Configure auto-scaling for the endpoint
D.Change the instance type to ml.m5.xlarge
AnswerC

Auto-scaling dynamically adds instances during traffic spikes, improving availability.

Why this answer

Configuring auto-scaling for the SageMaker endpoint allows it to automatically add or remove instances based on traffic load, improving availability during spikes. Option A is incorrect because setting initial instance count to 0 would cause requests to fail until an instance is provisioned, and on-demand invocation does not improve availability. Option B is incorrect because adding a second production variant with the same model does not change the total number of instances; the endpoint would still have only one instance if both variants share the same instance count.

Option D is incorrect because changing the instance type to ml.m5.xlarge might provide more resources per instance but does not increase the number of instances; a single instance can still become overwhelmed.

385
Multi-Selectmedium

A data scientist is training a gradient boosting model using SageMaker's built-in XGBoost algorithm. The dataset has missing values in several features. Which TWO actions should the data scientist take to handle missing values effectively? (Choose two.)

Select 2 answers
A.Impute missing values with the median of each feature using a preprocessing step.
B.Use one-hot encoding to create binary columns indicating missingness.
C.Remove all rows with missing values from the training dataset.
D.Apply PCA to reduce dimensionality and ignore missing values.
E.Set the 'missing' parameter in XGBoost to a specific value (e.g., 0) and let the algorithm learn the best imputation.
AnswersA, E

Median imputation is a robust method that preserves data.

Why this answer

(impute with median) is a standard preprocessing technique that can help gradient boosting models handle missing data. Option E (set the 'missing' parameter) leverages XGBoost's built-in capability to treat missing values as a separate direction, allowing the algorithm to learn the best split. Option D (PCA) is incorrect because PCA does not handle missing values; it requires complete data or imputation first.

Option B (one-hot encoding for missingness) is more appropriate for categorical features and may add noise. Option C (remove rows) leads to data loss and is generally not recommended when missing values are not too extensive.

386
Multi-Selectmedium

Which TWO metrics are suitable for evaluating a regression model? (Select TWO.)

Select 2 answers
A.Accuracy
B.Root Mean Squared Error (RMSE)
C.R-squared
D.F1-score
E.Precision
AnswersB, C

RMSE measures average prediction error in regression.

Why this answer

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

Exam trap

The MLS-C01 exam often tests the distinction between classification and regression metrics, and the trap here is that candidates mistakenly apply classification metrics like Accuracy, F1-score, or Precision to regression problems because they are familiar with them from other contexts.

387
MCQmedium

A company is using SageMaker to train a model, but the training job fails with an out-of-memory error. Which action should the data scientist take to resolve this issue?

A.Use a larger instance type for training
B.Decrease the batch size
C.Increase the learning rate
D.Increase the number of layers
AnswerB

Smaller batches use less memory.

Why this answer

Decreasing the batch size reduces the memory footprint per training step, directly addressing the out-of-memory (OOM) error. In SageMaker, the training instance's GPU or CPU memory is shared between model parameters, activations, and the batch data; a smaller batch size lowers the peak memory usage, allowing the training job to complete without exceeding the instance's memory limit.

Exam trap

The trap here is that candidates often default to scaling up infrastructure (larger instance) instead of optimizing hyperparameters like batch size, which is a more immediate and cost-effective fix for OOM errors in SageMaker.

How to eliminate wrong answers

Option A is wrong because using a larger instance type may resolve the OOM error but is not the most efficient or cost-effective first step; it increases costs and does not address the root cause of memory bloat. Option C is wrong because increasing the learning rate does not affect memory usage; it changes the step size in gradient descent and can lead to divergence or instability. Option D is wrong because increasing the number of layers adds more parameters and activations, which increases memory consumption and would worsen the OOM error.

388
MCQhard

A company is using SageMaker to train a deep learning model with TensorFlow. The training job is running on an ml.p3.16xlarge instance. The data scientist wants to maximize GPU utilization. Which configuration should be used?

A.Use a single GPU and increase the number of epochs.
B.Use a CPU-only instance for training and then deploy on GPU.
C.Use File mode input and a small batch size.
D.Use Pipe mode or Fast File mode with a large batch size that fits in GPU memory.
AnswerD

Pipe mode streams data efficiently; large batch size maximizes GPU compute.

Why this answer

To maximize GPU utilization on an ml.p3.16xlarge instance, the data pipeline must keep GPUs busy. Option D is correct because Pipe mode or Fast File mode reduce I/O bottlenecks by streaming data directly to the GPU, and a large batch size that fits in GPU memory ensures efficient parallel processing. Option A (single GPU, more epochs) wastes GPU resources by not using all available GPUs.

Option B (CPU instance for training) is counterproductive for GPU utilization. Option C (File mode, small batch size) may cause GPU idle time due to I/O bottlenecks and underutilization.

389
Drag & Dropmedium

Drag and drop the steps to use Amazon SageMaker Debugger to debug a training job in the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4

Why this order

Debugger requires hook configuration, job setup with rules, execution, and analysis.

390
MCQmedium

A team is using Amazon SageMaker to train a deep learning model. The training job is taking too long, and they want to reduce training time without significant accuracy loss. They have already tried increasing the number of instances. Which technique should they consider next?

A.Increase L2 regularization
B.Reduce model complexity
C.Gradient accumulation
D.Early stopping
AnswerC

Gradient accumulation simulates larger batch sizes, improving convergence speed.

Why this answer

Gradient accumulation, is correct because it allows the use of larger effective batch sizes without increasing memory usage, which can lead to faster convergence and reduced training time. Option A, increasing L2 regularization, does not directly reduce training time; it helps prevent overfitting. Option B, reducing model complexity, can reduce training time but may cause significant accuracy loss due to underfitting.

Option D, early stopping, can reduce training time by stopping training early but does not address the core issue of slow training per epoch; it may also halt training before convergence, risking accuracy loss.

391
MCQmedium

A data scientist is training a deep learning model for image classification using Amazon SageMaker. The training job is taking too long. The data scientist wants to speed up training by using distributed training across multiple GPUs. Which SageMaker feature or configuration should the data scientist use?

A.SageMaker Debugger
B.Model parallelism in SageMaker
C.SageMaker hyperparameter tuning
D.SageMaker Data Parallelism library
AnswerD

The SageMaker Data Parallelism library distributes data across multiple GPUs, reducing training time for large datasets.

Why this answer

The SageMaker Data Parallelism library is specifically designed to distribute training across multiple GPUs by splitting the input data across workers, which reduces per-GPU computation time and accelerates training for deep learning models. This library uses optimized all-reduce algorithms (e.g., Ring AllReduce) to synchronize gradients efficiently, making it ideal for speeding up image classification tasks that are data-intensive.

Exam trap

The trap here is that candidates often confuse model parallelism (splitting the model) with data parallelism (splitting the data), and incorrectly choose model parallelism when the scenario clearly describes a training speed issue solvable by distributing data across GPUs.

How to eliminate wrong answers

Option A is wrong because SageMaker Debugger is a tool for monitoring and debugging training jobs (e.g., capturing tensors, detecting anomalies), not for distributing training across GPUs. Option B is wrong because model parallelism in SageMaker splits the model itself across devices, which is useful for models too large to fit on a single GPU, but the question asks to speed up training for a model that already fits on a single GPU, where data parallelism is the appropriate approach. Option C is wrong because SageMaker hyperparameter tuning automates the search for optimal hyperparameters (e.g., learning rate, batch size) but does not directly enable distributed training across multiple GPUs.

392
MCQeasy

A company is using Amazon SageMaker to deploy a machine learning model for real-time inference. The model was trained using XGBoost and achieves high accuracy. However, during deployment, the endpoint returns a 'ModelError' when receiving input data. The input is a CSV string. What is the most likely cause?

A.The input data format does not match the model's expected format (e.g., CSV vs JSON)
B.The inference instance type is too small
C.The model is not properly loaded into memory
D.The model weights are corrupted during deployment
AnswerA

SageMaker inference endpoints require the input to be in the format expected by the model, e.g., CSV for XGBoost.

Why this answer

The most common cause of ModelError during inference is that the input format does not match what the model expects. XGBoost models typically expect CSV without headers. The serializer setting in SageMaker must be configured correctly.

If the model expects text/csv but the endpoint is configured as JSON, the error occurs. The other options are less likely: model weights are loaded correctly if the model deployed, and the instance type affects latency not errors.

393
MCQhard

A data scientist is training a model using SageMaker's built-in XGBoost algorithm with a large dataset stored in CSV format. The training job is using File mode. The data scientist wants to reduce the time it takes to start training. Which approach would be most effective?

A.Increase the size of the EBS volume.
B.Convert the data to Parquet format.
C.Use Pipe mode for the input data channel.
D.Increase the number of training instances.
AnswerC

Pipe mode starts training immediately by streaming data.

Why this answer

Pipe mode streams data directly from Amazon S3 into the training container, eliminating the need to first download the entire dataset to the EBS volume. This reduces the startup time significantly because training can begin as soon as the first records arrive, rather than waiting for the full download to complete.

Exam trap

The trap here is that candidates often assume converting to a more efficient format like Parquet will speed up training startup, but in File mode the bottleneck is the download step, not the read efficiency, so Pipe mode directly addresses the root cause.

How to eliminate wrong answers

Option A is wrong because increasing the EBS volume size does not reduce the time to start training; it only provides more storage space, and the download time from S3 remains the same. Option B is wrong because converting to Parquet format improves read performance and reduces storage size, but the training job still uses File mode, which requires the full dataset to be downloaded to the EBS volume before training starts. Option D is wrong because increasing the number of training instances does not reduce the startup time; it distributes the training workload across more machines but still requires each instance to download the full dataset in File mode before training begins.

394
MCQmedium

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

A.The policy does not allow s3:PutObject for the output location
B.The policy does not allow sagemaker:CreateTrainingJob
C.The policy has an explicit deny on s3:PutObject
D.The policy does not allow s3:GetObject on the output bucket
AnswerA

Correct. The policy lacks s3:PutObject permission on the output bucket, which is required for SageMaker to save the training output.

Why this answer

The IAM policy attached to the role must include the s3:PutObject action to allow SageMaker to write the training output to the specified S3 bucket. Without this permission, the training job fails with an access denied error. Option B is incorrect because the policy likely includes sagemaker:CreateTrainingJob permission, which is necessary to start the job.

Option C is incorrect because there is no explicit deny statement in the policy. Option D is incorrect because the training job needs to write output, not read from the output bucket; s3:GetObject is not required for the output location.

395
MCQmedium

A team is using Amazon SageMaker to train a model and wants to automatically stop training when the model stops improving to save costs. Which SageMaker feature should they use?

A.SageMaker Experiments
B.SageMaker Debugger
C.SageMaker Managed Spot Training with early stopping
D.SageMaker Automatic Model Tuning
AnswerB

Correct. SageMaker Debugger includes built-in rules like `LossNotDecreasing` that can automatically stop training when the model stops improving, thus saving costs.

Why this answer

SageMaker Debugger provides built-in rules, such as `LossNotDecreasing`, that automatically monitor training metrics and can halt a training job when the model stops improving. This directly addresses the requirement to stop training when improvement plateaus, saving costs. While Managed Spot Training (C) reduces cost by using spot instances, it does not inherently provide automatic early stopping based on model performance; early stopping must be implemented separately.

SageMaker Experiments (A) track and compare runs but do not stop training. Automatic Model Tuning (D) can apply early stopping to hyperparameter tuning jobs, but it is not a feature of a single training job.

Exam trap

Candidates often confuse 'Managed Spot Training' with early stopping because of the phrase 'early stopping' in its description. However, Managed Spot Training's built-in early stopping is for spot instance interruptions, not for detecting model convergence. The correct feature for automatic stopping based on model improvement is SageMaker Debugger's built-in rules.

396
Multi-Selecthard

A data scientist is using Amazon SageMaker to train a random forest model for a binary classification task. The dataset has 50 features and 10,000 samples. The model achieves high training accuracy but poor test accuracy. Which TWO actions should the scientist take to improve generalization?

Select 2 answers
A.Increase the max_samples parameter.
B.Reduce the max_depth of the trees.
C.Increase the max_features parameter.
D.Increase the number of trees (n_estimators).
E.Increase the min_samples_leaf parameter.
AnswersB, E

Correct. Reducing max_depth limits tree depth, reducing model complexity and overfitting.

Why this answer

The model is overfitting, as indicated by high training accuracy but poor test accuracy. To improve generalization, reduce model complexity. Reducing max_depth (B) limits the depth of each tree, preventing overly specific splits.

Increasing min_samples_leaf (E) requires a minimum number of samples per leaf, which smooths the model and reduces variance. These two actions directly combat overfitting in random forests.

397
MCQeasy

A data scientist has this IAM policy attached to an IAM role used by SageMaker. When trying to create a training job, the scientist gets an access denied error. The training data is in 's3://my-bucket/training-data/'. What is the most likely cause?

A.The bucket name is misspelled
B.The S3 resource ARN is incorrect
C.Missing s3:ListBucket permission
D.The sagemaker:CreateTrainingJob action is not allowed
AnswerC

SageMaker needs ListBucket permission to access objects.

Why this answer

The error occurs because the IAM policy grants s3:GetObject permission on the training data objects but lacks s3:ListBucket permission on the bucket itself. SageMaker's CreateTrainingJob API first performs a ListBucket call to verify the bucket exists and to enumerate objects, even if the exact object key is known. Without s3:ListBucket, the ListBucket call fails, resulting in an access denied error.

Exam trap

The MLS-C01 exam often tests the misconception that only s3:GetObject is needed to read objects from S3, but SageMaker's training job creation also requires s3:ListBucket to validate the bucket, making the missing ListBucket permission a common trap.

How to eliminate wrong answers

Option A is wrong because a misspelled bucket name would cause a 'NoSuchBucket' error, not an 'access denied' error. Option B is wrong because the S3 resource ARN is correctly specified as 'arn:aws:s3:::my-bucket/training-data/*' for the objects; the issue is the missing ListBucket permission, not an incorrect ARN. Option D is wrong because the policy explicitly allows 'sagemaker:CreateTrainingJob' on the SageMaker resource, so that action is permitted.

398
MCQmedium

A data scientist is training a binary classification model on an imbalanced dataset where the positive class represents 5% of the data. The model achieves 99% accuracy but only identifies 10% of the actual positive cases. Which metric should the data scientist focus on to evaluate the model's performance on the positive class?

A.Precision
B.Recall
C.AUC-ROC
D.F1 score
AnswerB

Recall measures the proportion of actual positives correctly identified, which is the key issue.

Why this answer

Recall measures the proportion of actual positive cases that are correctly identified. In this imbalanced dataset, the model has high accuracy but low recall (only 10% of positives caught), so recall is the key metric to improve. Option A (Precision) is not the primary focus because it measures how many predicted positives are correct, not coverage.

Option C (AUC-ROC) evaluates the model's ability to distinguish classes overall, not specifically the recall of the positive class. Option D (F1 score) is the harmonic mean of precision and recall, but since recall is very low, F1 is also low; however, recall directly addresses the problem of missing positives.

399
Multi-Selecteasy

A data scientist is training a binary classifier using imbalanced data. Which TWO techniques can help improve model performance on the minority class? (Choose two.)

Select 2 answers
A.Undersample the majority class randomly.
B.Use accuracy as the evaluation metric.
C.Use the F1 score as the evaluation metric.
D.Oversample the minority class using SMOTE.
E.Apply L1 regularization to the model.
AnswersC, D

F1 score balances precision and recall.

Why this answer

The F1 score is the harmonic mean of precision and recall, making it a robust evaluation metric for imbalanced datasets because it captures both false positives and false negatives. Unlike accuracy, which can be misleadingly high when the majority class dominates, the F1 score provides a balanced measure of model performance on the minority class.

Exam trap

The MLS-C01 exam often tests the misconception that random undersampling is always beneficial for imbalanced data, but candidates must recognize that it can discard useful majority class patterns and that SMOTE or other synthetic oversampling methods are preferred.

400
MCQmedium

Refer to the exhibit. A data scientist ran a SageMaker training job and reviewed the logs. The training completed quickly, but the model performance is very poor. What is the most likely cause?

A.The model is overfitting to the training data.
B.There is data leakage from the test set into the training set.
C.The learning rate is too low, causing slow convergence.
D.The training dataset is too small for the model complexity.
AnswerD

A small training dataset relative to model complexity leads to poor generalization. The model cannot learn meaningful patterns, resulting in poor performance. The quick training time also supports this.

Why this answer

The training job completed very quickly (about 1 minute), which suggests the dataset is small. A small training dataset, especially relative to the model's complexity, leads to poor performance because the model cannot learn generalizable patterns. With insufficient data, the model may overfit the training samples or fail to converge to a good solution, resulting in poor test performance.

Other options are less likely: overfitting (A) would typically show high training accuracy but poor validation accuracy, which is not indicated; data leakage (B) would artificially inflate performance; and a low learning rate (C) would cause slow convergence but not necessarily quick completion.

401
Multi-Selectmedium

A data scientist is performing feature selection for a classification problem with 100 features. The data scientist wants to reduce overfitting and improve model interpretability. Which THREE methods are appropriate for feature selection? (Choose THREE.)

Select 3 answers
A.Principal Component Analysis (PCA)
B.Recursive Feature Elimination (RFE)
C.L1 regularization (Lasso)
D.Adding random noise to the features
E.Feature importance from a random forest model
AnswersB, C, E

RFE recursively removes the least important features based on model coefficients or feature importance.

Why this answer

Recursive Feature Elimination (RFE) is a wrapper method that recursively removes the least important features based on a model's feature weights or coefficients, training the model multiple times to identify the optimal subset. This directly reduces overfitting by eliminating irrelevant or redundant features and improves interpretability by keeping only the most predictive features.

Exam trap

AWS often tests the distinction between feature selection (keeping original features) and dimensionality reduction (creating new features), so candidates mistakenly choose PCA as a feature selection method when it is actually a feature extraction technique.

402
Multi-Selectmedium

A data scientist is training a linear regression model and wants to handle multicollinearity among features. Which TWO actions are appropriate?

Select 2 answers
A.Add interaction terms between features
B.Use Ridge regression (L2 regularization)
C.Use Lasso regression (L1 regularization)
D.Remove one of the highly correlated features
E.Scale all features to have zero mean and unit variance
AnswersB, D

Ridge regression shrinks coefficients of correlated features, reducing their impact.

Why this answer

Ridge regression (L2) adds a penalty that can reduce the impact of correlated features. Removing one of the correlated features directly addresses multicollinearity. Lasso (L1) may also help but is less effective for groups of correlated features.

Scaling features does not remove collinearity. Adding interaction terms increases multicollinearity.

403
MCQmedium

A company uses Amazon SageMaker to train a classification model. The training job fails with an error indicating that the algorithm requires a GPU but the instance type does not have one. The scientist used the built-in XGBoost algorithm. What should the scientist do to resolve the issue?

A.Choose a CPU instance type for the training job
B.Install a GPU-enabled version of XGBoost in the training container
C.Change the algorithm to a deep learning algorithm
D.Use a larger GPU instance type
AnswerA

XGBoost can run on CPU; use CPU instance.

Why this answer

XGBoost does not require a GPU; it can run on CPU. The error may be due to using a GPU-only algorithm version or misconfiguration. The simplest solution is to choose a CPU instance type.

Installing a GPU version is unnecessary. Changing algorithm is not needed. Using a larger CPU instance can help but is not required.

Option A: Choose a CPU instance type is correct. Option B: Installing GPU version is not needed. Option C: Changing algorithm is unnecessary.

Option D: Using a larger instance may not address the issue if the instance type is still GPU-only.

404
MCQmedium

A machine learning team is deploying a model that performs real-time inference on streaming data from Amazon Kinesis Data Streams. The model requires sub-100ms latency. Which deployment option should the team choose?

A.Use Amazon SageMaker batch transform
B.Use Amazon SageMaker asynchronous inference
C.Deploy the model on an Amazon SageMaker real-time endpoint
D.Deploy a custom inference container on AWS Lambda
AnswerC

Real-time endpoints provide low-latency inference.

Why this answer

Amazon SageMaker real-time endpoints provide low-latency inference suitable for sub-100ms requirements. SageMaker batch transform (Option A) is for offline predictions. SageMaker asynchronous inference (Option B) is for near-real-time with longer latencies.

AWS Lambda (Option D) may not meet sub-100ms consistently due to cold starts and limited compute. Therefore, Option C is correct.

405
Multi-Selecteasy

A data scientist is evaluating a classification model. The confusion matrix shows that the model has 50 true positives, 100 true negatives, 20 false positives, and 30 false negatives. Which TWO metrics can be calculated from this confusion matrix? (Choose two.)

Select 2 answers
A.R-squared
B.F1 score
C.Recall
D.Root mean squared error
E.Precision
AnswersC, E

Recall = TP/(TP+FN) can be directly calculated.

Why this answer

Recall (also known as sensitivity) is calculated as TP / (TP + FN) = 50 / (50 + 30) = 0.625, measuring the proportion of actual positives correctly identified. Precision is calculated as TP / (TP + FP) = 50 / (50 + 20) = 0.714, measuring the proportion of positive predictions that are correct. Both metrics are directly derived from the four values in the confusion matrix.

Exam trap

The MLS-C01 exam often tests the distinction between metrics that are directly computed from the confusion matrix (like precision and recall) versus metrics that require additional calculations or are specific to regression tasks, leading candidates to mistakenly select F1 score as a direct metric or R-squared as applicable to classification.

406
MCQeasy

A company is building a recommendation system for an e-commerce platform. The data includes user IDs and item IDs. Which SageMaker built-in algorithm is most appropriate?

A.BlazingText
B.XGBoost
C.Factorization Machines
D.Image Classification
AnswerC

Designed for recommendation.

Why this answer

Factorization Machines (FM) are specifically designed for recommendation tasks with sparse, high-dimensional categorical data like user IDs and item IDs. They model pairwise interactions between features (e.g., user-item interactions) using factorized parameters, making them highly effective for collaborative filtering and implicit feedback scenarios in e-commerce.

Exam trap

The trap here is that candidates often choose XGBoost (B) because it is a versatile algorithm, but they overlook that FM is purpose-built for sparse, high-dimensional interaction data and directly models pairwise feature interactions without manual feature engineering.

How to eliminate wrong answers

Option A is wrong because BlazingText is optimized for word embeddings and text classification, not for collaborative filtering or sparse user-item interaction matrices. Option B is wrong because XGBoost is a gradient boosting tree-based algorithm that struggles with extremely sparse, high-cardinality categorical features without extensive feature engineering, and it does not inherently model pairwise interactions like FM. Option D is wrong because Image Classification is designed for convolutional neural network tasks on pixel data, not for tabular or recommendation data with user and item IDs.

407
MCQmedium

A company is building a binary classifier to detect fraudulent transactions. The dataset is highly imbalanced with only 0.1% positive cases. The data scientist uses logistic regression and obtains 99.9% accuracy on the test set. Which metric should the data scientist use to evaluate the model's performance?

A.ROC AUC
B.Precision-recall curve
C.Precision
D.F1 score
AnswerB

Precision-recall curves focus on the positive class and handle imbalance well.

Why this answer

With only 0.1% positive cases, accuracy is misleading because a model that always predicts 'not fraudulent' achieves 99.9% accuracy. The precision-recall curve focuses on the positive class and is robust to extreme class imbalance, showing the trade-off between precision and recall across thresholds. This makes it the best choice for evaluating a binary classifier on highly imbalanced fraud detection data.

Exam trap

The trap here is that candidates see 'ROC AUC' as a standard metric and forget that it can be inflated by a large number of true negatives in imbalanced datasets, making precision-recall the correct choice for evaluating rare event classifiers.

How to eliminate wrong answers

Option A is wrong because ROC AUC can be overly optimistic on highly imbalanced datasets; the area under the ROC curve is dominated by the large number of true negatives, masking poor performance on the rare positive class. Option C is wrong because precision alone is a single-point metric that does not capture the trade-off with recall, so it cannot fully evaluate model performance across different decision thresholds. Option D is wrong because the F1 score is a harmonic mean of precision and recall at a single threshold, which may not reflect the model's overall ability to rank positive cases; it is less informative than the full precision-recall curve for threshold selection in imbalanced settings.

408
MCQmedium

A company wants to deploy a machine learning model that requires GPU acceleration for inference. The model is small and can fit on a single GPU. Which SageMaker endpoint configuration is MOST cost-effective?

A.Use a ml.p3.16xlarge instance with 8 GPUs.
B.Use a SageMaker Serverless Inference endpoint.
C.Use a Multi-Model Endpoint on a ml.g4dn.xlarge instance.
D.Use a ml.p3.2xlarge instance with 1 GPU and enable automatic scaling.
AnswerD

A single GPU instance with scaling provides cost-effective real-time inference.

Why this answer

The most cost-effective because it uses a single-GPU ml.p3.2xlarge instance, which matches the requirement that the model fits on one GPU, and enables automatic scaling to handle variable traffic without over-provisioning. This avoids paying for unused GPU capacity while still providing the necessary GPU acceleration for inference.

Exam trap

The trap here is that candidates often choose a larger GPU instance (like A) thinking it provides better performance, or select Serverless Inference (B) assuming it supports all instance types, but the exam tests the specific constraint that GPU acceleration is required and that Serverless Inference is CPU-only.

How to eliminate wrong answers

Option A is wrong because a ml.p3.16xlarge instance with 8 GPUs is massively over-provisioned for a model that fits on a single GPU, leading to unnecessary cost. Option B is wrong because SageMaker Serverless Inference does not support GPU acceleration; it uses CPU-based compute, which would not meet the GPU requirement. Option C is wrong because a Multi-Model Endpoint on a ml.g4dn.xlarge instance, while cost-effective for hosting multiple models, uses a single GPU that must be shared among all loaded models, potentially causing contention and not being the most cost-effective for a single model that fits on one GPU.

409
MCQhard

A data scientist is building a binary classifier for loan default prediction. The cost of a false negative (missing a default) is 10 times higher than the cost of a false positive. Which evaluation metric is MOST appropriate?

A.Precision
B.F-beta score with beta=2
C.Accuracy
D.Area under the ROC curve
AnswerB

F-beta with beta>1 gives more weight to recall, minimizing costly false negatives.

Why this answer

The F-beta score with beta=2 is the most appropriate metric because it weights recall (sensitivity) higher than precision, which is critical when false negatives are 10 times more costly than false positives. Beta=2 means recall is considered 2^2 = 4 times more important than precision, directly aligning with the asymmetric cost structure. This allows the model to be tuned to minimize missed defaults, even at the expense of more false alarms.

Exam trap

The trap here is that candidates often default to AUC-ROC as a 'balanced' metric without realizing it does not incorporate asymmetric error costs, leading them to overlook the F-beta score which is explicitly designed for such scenarios.

How to eliminate wrong answers

Option A is wrong because precision focuses only on the proportion of true positives among positive predictions, ignoring false negatives entirely, so it cannot account for the higher cost of missing defaults. Option C is wrong because accuracy treats all correct predictions equally and is misleading when classes are imbalanced, which is common in loan default prediction, and it does not incorporate the differential cost of errors. Option D is wrong because the area under the ROC curve (AUC-ROC) measures the model's ability to discriminate between classes across all thresholds but does not directly optimize for a specific cost ratio; it is a rank-based metric that does not penalize false negatives more heavily.

410
MCQeasy

A data scientist is building a time series forecasting model for monthly sales. The data shows strong seasonality with a yearly pattern. They plan to use Amazon Forecast. Which algorithm should they choose?

A.XGBoost
B.K-means clustering
C.DeepAR+
D.Linear regression
AnswerC

DeepAR+ is designed for time series with seasonality and trends.

Why this answer

DeepAR+ is purpose-built for time series forecasting with strong seasonality, as it uses recurrent neural networks (RNNs) to capture complex temporal dependencies and automatically models seasonal patterns like yearly cycles. Amazon Forecast natively supports DeepAR+ for such use cases, making it the optimal choice over general-purpose or non-forecasting algorithms.

Exam trap

The trap here is that candidates often choose XGBoost (A) because it is a powerful general-purpose algorithm, but they overlook that Amazon Forecast provides specialized algorithms like DeepAR+ for time series tasks, and XGBoost is not a native Forecast algorithm.

How to eliminate wrong answers

Option A is wrong because XGBoost is a gradient boosting algorithm designed for tabular data and does not inherently model temporal dependencies or seasonality without extensive feature engineering (e.g., lag features, time-based indicators), making it suboptimal for raw time series forecasting. Option B is wrong because K-means clustering is an unsupervised learning algorithm for grouping data points based on similarity, not for predicting future values in a time series, and it cannot capture sequential or seasonal patterns. Option D is wrong because linear regression assumes a linear relationship between features and target and cannot model complex, non-linear seasonality or long-range temporal dependencies without manual feature engineering, unlike DeepAR+ which learns these patterns automatically.

411
Multi-Selecthard

Which THREE of the following are common causes of overfitting in machine learning models?

Select 3 answers
A.Using a complex model like a deep neural network on a small dataset
B.Model has too many parameters relative to the number of training samples
C.Having a large dataset with many samples
D.Training for too many epochs
E.Using regularization techniques
AnswersA, B, D

Complex models on small data overfit.

Why this answer

A complex model like a deep neural network has high capacity and can easily memorize noise and patterns specific to a small dataset, rather than learning generalizable features. With limited training samples, the model fails to capture the underlying data distribution, leading to poor performance on unseen data.

Exam trap

The MLS-C01 exam often tests the misconception that more data or regularization causes overfitting, when in fact both are standard countermeasures; the trap is confusing correlation with causation in model training dynamics.

412
MCQhard

A data scientist is tuning a gradient boosting model using Amazon SageMaker's Automatic Model Tuning (hyperparameter optimization). The objective metric is validation:auc. After 50 training jobs, the best model still has a validation AUC of only 0.65. The scientist suspects overfitting because the training AUC is 0.99. Which hyperparameter configuration is MOST likely to reduce overfitting?

A.Increase lambda from 1 to 10
B.Increase num_round from 100 to 500
C.Increase max_depth from 6 to 12
D.Increase subsample from 0.5 to 1.0
AnswerA

Higher L2 regularization reduces overfitting by penalizing large weights.

Why this answer

Increasing lambda (L2 regularization) from 1 to 10 adds a stronger penalty on the magnitude of leaf weights in the gradient boosting model. This directly reduces overfitting by discouraging the model from fitting noise in the training data, which is consistent with the observed gap between training AUC (0.99) and validation AUC (0.65). In XGBoost, lambda controls the L2 regularization term on weights, and a higher value forces the model to be simpler and more generalizable.

Exam trap

The trap here is that candidates often assume increasing model complexity (e.g., more rounds, deeper trees) will improve performance, but the question explicitly describes overfitting, so the correct answer must reduce complexity or increase regularization, which is lambda.

How to eliminate wrong answers

Option B is wrong because increasing num_round (number of boosting rounds) from 100 to 500 would increase model complexity and training time, likely worsening overfitting by allowing the model to further memorize the training data. Option C is wrong because increasing max_depth from 6 to 12 allows trees to grow deeper, capturing more specific interactions and noise, which exacerbates overfitting rather than reducing it. Option D is wrong because increasing subsample from 0.5 to 1.0 means using all training data for each tree, removing the stochastic regularization effect that subsampling provides, which would reduce generalization and increase overfitting risk.

413
MCQeasy

A company is using SageMaker Autopilot to automatically build a binary classification model. After the AutoML job completes, the data scientist wants to understand which features are most important for the best candidate model. How can the scientist get feature importance?

A.Open the SageMaker Autopilot job details and view the 'Explainability' tab
B.Re-run the best model using SageMaker built-in XGBoost with the 'feature_importance' hyperparameter
C.Check the CloudWatch Logs for the training job
D.Use SageMaker Ground Truth to label a new dataset
AnswerA

Autopilot provides feature importance in the explainability tab for the best candidate.

Why this answer

SageMaker Autopilot automatically generates a 'Explainability' tab within the job details for the best candidate model. This tab uses SHAP (SHapley Additive exPlanations) values to provide feature importance, showing which features most influence the model's predictions. The data scientist can directly access this information without any additional configuration or re-running the model.

Exam trap

AWS often tests the misconception that feature importance must be manually extracted via code or logs, when in fact SageMaker Autopilot provides it directly in the UI under the 'Explainability' tab for the best candidate model.

How to eliminate wrong answers

Option B is wrong because SageMaker built-in XGBoost does not have a 'feature_importance' hyperparameter; feature importance is a property of the trained model object (e.g., via `get_fscore()` or `plot_importance()`), not a hyperparameter set before training. Option C is wrong because CloudWatch Logs for the training job contain training metrics, loss values, and algorithm logs, but not structured feature importance data; feature importance is not emitted to logs by default. Option D is wrong because SageMaker Ground Truth is a data labeling service for creating labeled datasets, not for extracting feature importance from a trained model; it is unrelated to model interpretability.

414
Multi-Selecthard

A company is using Amazon SageMaker to deploy a model for real-time inference. The model is a deep neural network that requires GPU for low latency. The endpoint currently uses a single ml.p3.2xlarge instance. Traffic is expected to increase by 5x. Which TWO actions should the company take to handle the increased traffic?

Select 2 answers
A.Use a larger instance type with more GPUs
B.Switch to a CPU-based instance
C.Enable auto-scaling on the endpoint
D.Use a multi-model endpoint
E.Decrease the batch size
AnswersA, C

Larger instance provides more GPU compute.

Why this answer

The correct actions are A and C. Using a larger instance type with more GPUs (e.g., ml.p3.8xlarge) increases the compute capacity per instance, allowing the model to handle more requests without increasing latency, as GPUs are essential for low-latency inference on deep neural networks. Enabling auto-scaling on the endpoint dynamically adds or removes instances based on traffic, ensuring the endpoint can scale out to handle the 5x increase without manual intervention.

Option B is incorrect because switching to CPU would significantly increase latency, as deep neural networks benefit from GPU acceleration. Option D is incorrect because multi-model endpoints are designed to host multiple models on a single instance, not to increase throughput for a single model. Option E is incorrect because decreasing batch size would reduce throughput per request, worsening performance under increased traffic.

415
MCQhard

A machine learning team is using Amazon SageMaker to train a model using a custom Docker container. The training job fails with an error: 'Unable to write to /opt/ml/model'. The container does not have root access. What is the most likely cause?

A.The /opt/ml/model directory does not exist in the container
B.The container is using an unsupported operating system
C.The container does not have internet access
D.The container process does not have write permission to /opt/ml/model
AnswerD

The process user lacks write permissions to the directory.

Why this answer

SageMaker expects training containers to write the model artifact to /opt/ml/model. The container process must have write permissions to that directory. Root access is not required; the container runs with the 'sagemaker' user.

The directory may not exist or permissions are wrong. The error indicates a write issue, likely permissions.

416
MCQhard

A data scientist is building a model to predict customer churn. The dataset has 20 features, including categorical variables with high cardinality (e.g., ZIP code). The data scientist wants to use a linear model. Which feature engineering technique is MOST appropriate for the high-cardinality categorical features?

A.One-hot encoding
B.Target encoding
C.TF-IDF
D.Standard scaling
AnswerB

Target encoding handles high cardinality well.

Why this answer

Target encoding is the most appropriate technique for high-cardinality categorical features when using a linear model because it replaces each category with the mean of the target variable for that category, creating a numeric feature that captures the relationship between the category and the target without exploding the feature space. One-hot encoding would create an unmanageable number of binary columns (e.g., thousands of ZIP codes), leading to the curse of dimensionality and making the linear model unstable or computationally infeasible.

Exam trap

AWS often tests the trap that candidates default to one-hot encoding for all categorical variables, failing to recognize that high cardinality makes it impractical for linear models, whereas target encoding is a more efficient alternative that preserves feature information without dimensionality explosion.

How to eliminate wrong answers

Option A is wrong because one-hot encoding for high-cardinality features like ZIP code would generate thousands of dummy variables, causing the linear model to suffer from the curse of dimensionality, multicollinearity, and overfitting. Option C is wrong because TF-IDF is designed for text data to weigh term frequency against inverse document frequency, not for encoding categorical variables like ZIP codes in a churn prediction task. Option D is wrong because standard scaling is a normalization technique for numerical features, not a method for encoding categorical variables, and applying it to raw categorical labels would be meaningless.

417
MCQmedium

A data scientist is using Amazon SageMaker to train a model using the built-in XGBoost algorithm. The training job is taking a long time. The data scientist notices that the input data is in CSV format and the training job is using File mode. The data size is 50 GB. What is the BEST way to reduce training time?

A.Use a larger instance type with more vCPUs.
B.Convert the data to Parquet format.
C.Reduce the number of features in the dataset.
D.Switch the input mode to Pipe.
AnswerD

Pipe mode reduces I/O wait time by streaming data.

Why this answer

Pipe mode streams data directly from S3 to the training algorithm, reducing I/O overhead and improving throughput compared to File mode, which downloads the entire dataset first. Option A (larger instance) may not help if the bottleneck is I/O rather than compute. Option B (Parquet format) can improve performance but is not as impactful as Pipe mode for streaming.

Option C (reduce features) could reduce training time but at the cost of model accuracy, making it not the best approach.

418
MCQmedium

A company is training a deep learning model on SageMaker using a large dataset stored in S3. The training job is taking a long time due to I/O bottlenecks. Which action would MOST effectively reduce the I/O bottleneck?

A.Use Amazon EFS as the data source.
B.Use Amazon FSx for Lustre as the data source.
C.Increase the number of training instances.
D.Use Pipe input mode in the SageMaker estimator.
AnswerD

Pipe mode streams data, reducing disk I/O.

Why this answer

Pipe input mode streams training data directly from S3 to the algorithm without writing intermediate files to disk, eliminating I/O wait time. Option A (using Amazon EFS) introduces network file system latency, which would not reduce I/O bottleneck. Option B (using Amazon FSx for Lustre) could improve throughput but is more complex to set up and may not be as effective as Pipe mode for streaming.

Option C (increasing the number of training instances) might distribute computation but does not directly reduce per-instance I/O bottleneck.

419
MCQmedium

A data scientist is using Amazon SageMaker to build a text classification model. The dataset has 100,000 labeled samples and 20 classes. The scientist wants to use a pre-trained BERT model and fine-tune it. Which approach is MOST cost-effective?

A.Train a BERT model from scratch using a larger instance.
B.Fine-tune a pre-trained BERT-base model using a GPU instance.
C.Use a pre-trained BERT-large model with a larger instance.
D.Train a CNN model from scratch using CPU instances.
AnswerB

BERT-base is cost-effective and fine-tuning is efficient.

Why this answer

Fine-tuning a pre-trained BERT-base model on a GPU instance is the most cost-effective approach. Pre-trained BERT models already capture general language features, so fine-tuning requires less computation and data compared to training from scratch. BERT-base is smaller than BERT-large, reducing cost while still being effective for text classification.

Option A is wrong because training BERT from scratch is extremely expensive and unnecessary. Option C is wrong because BERT-large has higher cost and may overfit given the dataset size. Option D is wrong because CNN models from scratch would require more hyperparameter tuning and may not achieve comparable accuracy to a fine-tuned transformer.

420
MCQmedium

A team is using Amazon SageMaker to train a deep learning model for image classification. The training job is taking too long, and they want to reduce training time without sacrificing model accuracy. Which approach is most effective?

A.Reduce the batch size
B.Reduce the number of training epochs
C.Reduce the image resolution
D.Use transfer learning with a pre-trained model and fine-tune on the target dataset
AnswerD

Transfer learning uses features learned from a large dataset, allowing faster convergence and similar accuracy.

Why this answer

Transfer learning uses a pre-trained model that already has learned feature representations from a large dataset. Fine-tuning this model on the target dataset requires significantly less training time compared to training from scratch, while still achieving high accuracy. Option A is wrong because reducing batch size can slow down training and may cause convergence issues.

Option B is wrong because reducing epochs can lead to underfitting and lower accuracy. Option C is wrong because reducing image resolution may remove important details, degrading model performance.

421
MCQmedium

A company uses Amazon SageMaker to deploy a real-time inference endpoint for a regression model. The endpoint is experiencing high latency during spikes in traffic. The data scientist needs to reduce latency while maintaining cost efficiency. Which action should the data scientist take?

A.Use batch transform instead of real-time inference
B.Use a larger instance type for the endpoint
C.Deploy the model on a multi-model endpoint
D.Enable automatic scaling for the endpoint
AnswerD

Automatic scaling adds instances during traffic spikes, reducing latency.

Why this answer

Enabling automatic scaling for the SageMaker endpoint allows the number of instances to dynamically adjust based on traffic patterns, reducing latency during spikes by adding capacity when needed and removing it during low traffic to maintain cost efficiency. Automatic scaling uses CloudWatch metrics (e.g., InvocationsPerInstance or CPUUtilization) to trigger scale-out and scale-in policies, ensuring the endpoint can handle bursts without over-provisioning.

Exam trap

The trap here is that candidates confuse automatic scaling with simply adding more resources (Option B) or assume multi-model endpoints (Option C) are a latency solution, when in fact automatic scaling is the only option that directly addresses both latency spikes and cost efficiency through dynamic instance management.

How to eliminate wrong answers

Option A is wrong because batch transform is designed for offline, asynchronous inference on large datasets and does not support real-time inference, so it cannot reduce latency for a real-time endpoint. Option B is wrong because using a larger instance type may reduce latency for individual requests but increases cost significantly and does not dynamically adapt to traffic spikes, leading to either over-provisioning or continued high latency during bursts. Option C is wrong because a multi-model endpoint hosts multiple models on the same instance to improve resource utilization, but it does not inherently reduce latency during traffic spikes; in fact, it can increase latency due to model loading/unloading overhead and contention for shared resources.

422
MCQeasy

A data scientist is using Amazon SageMaker to train a linear learner model for regression. After reviewing the training logs, the data scientist notices that the loss is not decreasing and remains high. The learning rate is set to 0.01. The data is normalized. What should the data scientist do to improve convergence?

A.Normalize the data again.
B.Reduce the mini-batch size.
C.Try different learning rates, such as 0.001 or 0.1.
D.Increase the number of epochs.
AnswerC

Tuning the learning rate is a common first step to improve convergence.

Why this answer

The loss is not decreasing, which often indicates an inappropriate learning rate. Trying different learning rates (e.g., 0.001 or 0.1) can help find a rate that allows the model to converge. Option A is incorrect because the data is already normalized; normalizing again would have no effect.

Option B is incorrect because reducing the mini-batch size introduces more stochasticity but does not directly address learning rate issues. Option D is incorrect because increasing epochs does not help if the learning rate prevents convergence; the model may continue to oscillate or plateau.

423
Multi-Selecteasy

A data scientist is training a text classification model using Amazon SageMaker's built-in BlazingText algorithm. The dataset contains 1 million documents. Which TWO hyperparameters are most important to tune for improving model accuracy?

Select 2 answers
A.Learning rate
B.Batch size
C.Loss function
D.Type of optimizer
E.Number of epochs
AnswersA, E

Learning rate controls the step size during optimization and is crucial for convergence.

Why this answer

Learning rate and number of epochs are critical hyperparameters for training neural networks like BlazingText. They control how quickly the model learns and how long it trains.

424
MCQmedium

A company is building a fraud detection model using a random forest classifier. The dataset is highly imbalanced with 99% legitimate transactions and 1% fraudulent. The model currently achieves 99% accuracy on the test set, but the fraud recall is only 10%. The business requires at least 80% recall for fraud. The data scientist has tried oversampling the minority class and adjusting class weights, but recall remains below 40%. The dataset contains millions of transactions with hundreds of features. Which approach should the data scientist try next to improve fraud recall?

A.Randomly undersample the majority class to a 50:50 ratio
B.Use a gradient boosting machine (e.g., XGBoost) with scale_pos_weight parameter
C.Apply PCA to reduce dimensionality before training
D.Use a logistic regression model with L2 regularization
AnswerB

Gradient boosting often outperforms random forest on imbalance with proper weighting.

Why this answer

The current model uses random forest but still has low recall after oversampling and class weights. Gradient boosting machines like XGBoost can handle imbalanced data well with the scale_pos_weight parameter, which adjusts the weight of the positive class. This approach often yields better recall than random forest on very imbalanced datasets.

Option A (random undersampling) would discard too much majority data and reduce model performance. Option C (PCA) is not directly targeting the imbalance issue and may remove important features. Option D (logistic regression) is a linear model that typically underperforms on complex, high-dimensional data with severe imbalance.

425
MCQeasy

A company uses Amazon SageMaker to train a model and wants to track metrics like loss and accuracy in real-time. Which SageMaker feature should be used?

A.SageMaker Model Monitor
B.SageMaker metrics and CloudWatch dashboards
C.SageMaker Experiments
D.SageMaker Debugger
AnswerB

Provides real-time training metrics.

Why this answer

SageMaker's built-in metrics integration with CloudWatch allows real-time tracking of training metrics such as loss and accuracy. Option A (SageMaker Model Monitor) is for monitoring inference quality and data drift after deployment, not real-time training metrics. Option C (SageMaker Experiments) is for organizing, tracking, and comparing different experiment runs, but it does not provide real-time streaming of metrics during training.

Option D (SageMaker Debugger) is used for debugging training issues like gradient anomalies, not for real-time metric tracking.

426
Multi-Selecthard

Which THREE techniques can help reduce overfitting in a neural network trained on a small dataset?

Select 3 answers
A.Apply L2 weight regularization
B.Increase the number of hidden layers
C.Train for more epochs
D.Use data augmentation
E.Add dropout layers
AnswersA, D, E

L2 regularization penalizes large weights.

Why this answer

L2 weight regularization (also known as weight decay) penalizes large weights by adding a term to the loss function proportional to the sum of squared weights. This forces the network to learn simpler patterns and reduces sensitivity to noise in the training data, which is especially helpful when the dataset is small and prone to overfitting.

Exam trap

The MLS-C01 exam often tests the misconception that increasing model complexity (more layers or epochs) always improves performance, when in fact on small datasets it reliably worsens overfitting.

427
MCQhard

A machine learning engineer is using Amazon SageMaker to deploy a model for real-time inference. The model is a large ensemble that requires 4 GB of memory and has a latency requirement of 100 ms. Which instance type and deployment configuration should the engineer choose to optimize cost while meeting requirements?

A.ml.m5.large (2 vCPU, 8 GB memory)
B.SageMaker Serverless Inference
C.ml.c5.large (2 vCPU, 4 GB memory)
D.ml.p3.2xlarge (8 vCPU, 61 GB memory, 1 GPU)
AnswerA

8 GB memory provides headroom, and cost is moderate.

Why this answer

ml.m5.large provides 8 GB memory, sufficient for a 4 GB model plus overhead, and is cost-effective for real-time inference with moderate latency requirements. Option B (SageMaker Serverless Inference) is incorrect because cold start latency may exceed the 100 ms requirement. Option C (ml.c5.large) has only 4 GB memory, insufficient for the model.

Option D (ml.p3.2xlarge) is GPU-accelerated and expensive, making it overkill for a non-GPU workload.

428
MCQhard

A company is building a real-time fraud detection system using Amazon SageMaker. The model must have low latency (under 10ms) and high throughput (thousands of predictions per second). The team has trained a gradient boosting model using XGBoost. Which SageMaker inference option is MOST suitable?

A.Use SageMaker asynchronous inference.
B.Deploy the model on a SageMaker real-time endpoint with a multi-model endpoint.
C.Deploy the model on a SageMaker serverless endpoint.
D.Use a batch transform job.
AnswerB

Multi-model endpoints optimize cost and latency for high throughput.

Why this answer

A multi-model endpoint (MME) on SageMaker is the most suitable option because it allows you to host multiple XGBoost models on a single endpoint, sharing the underlying instance to maximize throughput and minimize latency. MMEs keep models loaded in memory and route requests to the correct model with sub-10ms overhead, meeting the low-latency and high-throughput requirements for real-time fraud detection.

Exam trap

The trap here is that candidates often confuse 'real-time' with 'serverless' or 'asynchronous', failing to recognize that serverless endpoints introduce cold-start latency and throughput limits that break the sub-10ms and high-throughput requirements.

How to eliminate wrong answers

Option A is wrong because asynchronous inference is designed for large payloads or long processing times (e.g., batch processing with minutes of latency), not for real-time sub-10ms predictions. Option C is wrong because serverless endpoints have a cold-start latency that can exceed 10ms and are throttled at lower concurrency, making them unsuitable for thousands of predictions per second. Option D is wrong because batch transform jobs are offline, not real-time, and cannot provide sub-10ms latency or handle streaming prediction requests.

429
MCQeasy

A data scientist is building a regression model to predict energy consumption. The dataset includes features like temperature, humidity, day of week, and holiday flags. The scientist uses a linear regression model and obtains an R-squared of 0.85 on training and 0.40 on test. The scientist suspects the model is not capturing non-linear relationships. Which approach should the scientist use to capture non-linearity?

A.Apply PCA to the feature set
B.Increase L1 regularization using Lasso
C.Remove features with low correlation to the target
D.Add polynomial features (e.g., squared terms and interactions)
AnswerD

Polynomial features allow linear model to fit non-linear patterns.

Why this answer

(add polynomial features) captures non-linear relationships by introducing squared terms and interactions, allowing the linear model to fit curvature. Option A (PCA) reduces dimensionality but does not add non-linearity. Option B (L1 regularization using Lasso) reduces overfitting by shrinking coefficients but does not introduce non-linear terms.

Option C (removing features with low correlation) may lose information and does not help with non-linearity.

430
MCQeasy

A data scientist is building a classification model to predict customer churn. The dataset has 10,000 samples with 100 features. After training a logistic regression model, the scientist observes that the model has high variance (overfitting). Which technique can reduce overfitting?

A.Remove the regularization term
B.Use L2 regularization (Ridge)
C.Add polynomial features
D.Use a smaller learning rate
AnswerB

L2 regularization penalizes large weights, reducing overfitting.

Why this answer

L2 regularization (Ridge) adds a penalty on large coefficients, reducing overfitting. Removing features may help but is not the best practice. Increasing model complexity (polynomial features) would worsen overfitting.

Increasing training data helps but not listed.

431
MCQmedium

A data scientist is using Amazon SageMaker to train a model. The training dataset is stored in S3 as CSV files. The scientist wants to use the SageMaker built-in Linear Learner algorithm. Which input mode should be used for optimal performance?

A.Augmented manifest file mode
B.File mode
C.Pipe mode
D.Fast file mode
AnswerC

Pipe mode streams data, reducing I/O overhead and improving performance.

Why this answer

Pipe mode streams data directly from S3 to the algorithm without writing to disk, reducing I/O overhead. File mode downloads the entire dataset to disk, which is slower. Fast file mode is not a SageMaker feature.

Augmented manifest is for additional metadata, not performance.

432
MCQhard

A company runs a real-time recommendation system on SageMaker with a model that uses a deep neural network. The endpoint uses a single ml.p3.2xlarge instance. Recently, the number of users has grown, and the endpoint's latency has increased from 50ms to 200ms, exceeding the SLA of 100ms. The model inference code is optimized and cannot be improved further. The company wants to reduce latency while minimizing cost. The data scientist has the following options: A. Switch to a larger instance type with more GPU memory, such as ml.p3.8xlarge. B. Use SageMaker's Elastic Inference to attach an EI accelerator to the existing instance. C. Deploy the model on multiple smaller instances (e.g., ml.p3.2xlarge) behind a load balancer and distribute traffic. D. Convert the model to use TensorFlow Lite and deploy on a CPU-based instance. Which option is the MOST cost-effective and meets the latency requirement?

A.Convert to TensorFlow Lite on CPU
B.Use SageMaker's Elastic Inference
C.Switch to a larger instance type, e.g., ml.p3.8xlarge
D.Deploy on multiple smaller instances behind a load balancer
AnswerB

Elastic Inference provides cost-effective GPU acceleration.

Why this answer

The most cost-effective option is B (Use SageMaker's Elastic Inference) because it provides dedicated GPU acceleration at a fraction of the cost of a full GPU instance, reducing inference latency without requiring a larger instance. Option C (Switch to a larger instance type) would increase cost significantly. Option D (Deploy on multiple smaller instances behind a load balancer) would increase complexity and cost, and may not guarantee latency reduction.

Option A (Convert to TensorFlow Lite on CPU) could reduce cost but may not meet the latency requirement as CPU inference is slower than GPU for deep neural networks, and model conversion might impact accuracy.

433
MCQmedium

Refer to the exhibit. An IAM policy is attached to a SageMaker notebook instance. A data scientist is trying to invoke the endpoint 'my-endpoint' from the notebook but receives an AccessDenied error. What is the likely cause?

A.The policy allows InvokeEndpoint only for endpoints with the exact ARN, but the endpoint ARN is different.
B.The policy uses a wildcard for CreateEndpoint, which is too permissive.
C.The policy does not allow sagemaker:CreateEndpoint for the specific endpoint.
D.The policy is not attached to the IAM role used by the notebook instance.
AnswerD

Without the policy, InvokeEndpoint is denied.

Why this answer

The error 'AccessDenied' when invoking a SageMaker endpoint from a notebook instance typically indicates that the IAM role attached to the notebook does not have the required permissions. The policy shown in the exhibit grants sagemaker:InvokeEndpoint for the specific endpoint ARN, but if the policy is not attached to the IAM role that the notebook instance is using, the role lacks the permission, resulting in the AccessDenied error. Attaching the policy to the correct IAM role resolves the issue.

Exam trap

AWS often tests the distinction between having a policy defined versus having it attached to the correct IAM role; candidates mistakenly assume that if a policy exists in the account, it automatically applies to all resources, but IAM policies must be explicitly attached to the role or user making the request.

How to eliminate wrong answers

Option A is wrong because the policy explicitly allows InvokeEndpoint for the endpoint ARN 'arn:aws:sagemaker:us-east-1:123456789012:endpoint/my-endpoint', so if the endpoint ARN matches, this is not the cause. Option B is wrong because the wildcard for CreateEndpoint is irrelevant to the InvokeEndpoint action; the error is about invoking, not creating, and a permissive CreateEndpoint policy does not cause an AccessDenied on InvokeEndpoint. Option C is wrong because the policy does not need to allow sagemaker:CreateEndpoint for invoking an endpoint; the required action is sagemaker:InvokeEndpoint, which is already allowed in the policy.

434
Multi-Selecteasy

Which TWO of the following are appropriate use cases for Amazon SageMaker built-in algorithms?

Select 2 answers
A.Classifying customer churn using tabular data
B.Reinforcement learning using Q-learning
C.Classifying text documents using word embeddings
D.Image classification using a custom CNN architecture
E.Time series forecasting using ARIMA
AnswersA, C

XGBoost or Linear Learner can be used.

Why this answer

XGBoost is suitable for tabular classification. BlazingText is for text classification on word embeddings. Image classification using custom CNNs may use built-in but not necessarily.

Time series forecasting is not a built-in algorithm (use DeepAR). Reinforcement learning is not a built-in algorithm.

435
MCQeasy

A machine learning engineer is using Amazon SageMaker to train a model. The training job fails with an out-of-memory error. The training data size is 10 GB and the instance is ml.m5.xlarge (16 GB memory). Which change is MOST likely to resolve the issue without increasing cost?

A.Reduce the batch size in the training script.
B.Switch to a GPU instance like p3.2xlarge.
C.Use a larger instance type like ml.m5.4xlarge.
D.Decrease the training dataset size.
AnswerA

Smaller batch size reduces memory footprint per iteration.

Why this answer

Many algorithms allow you to set a batch size, and reducing it lowers memory usage. Option B is wrong because changing to GPU may not help and could increase cost. Option C is wrong because increasing instance type increases cost.

Option D is wrong because decreasing the dataset size may lose information.

436
Multi-Selecteasy

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

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

R-squared measures the proportion of variance explained by the model.

Why this answer

R-squared is a standard metric for linear regression that measures the proportion of variance in the dependent variable explained by the independent variables. It ranges from 0 to 1, with higher values indicating better fit, making it directly appropriate for evaluating regression model performance.

Exam trap

AWS often tests the distinction between regression and classification metrics, and the trap here is that candidates mistakenly apply classification metrics like Precision, AUC-ROC, or F1 score to a regression problem, not recognizing they are fundamentally incompatible with continuous outputs.

437
MCQhard

A team deployed a SageMaker endpoint for real-time inference using a PyTorch model. After monitoring, they notice that the latency is highly variable, with p99 latency 10x the p50 latency. The endpoint uses a single ml.c5.2xlarge instance with auto-scaling based on average CPU utilization. Which change is most likely to reduce latency variability?

A.Increase the batch size for inference
B.Pre-warm the model by sending dummy requests every minute
C.Switch to a GPU instance type
D.Change the auto-scaling metric to 'InvocationsPerInstance'
AnswerD

Scaling on invocations per instance prevents overload and reduces queueing.

Why this answer

Scaling based on InvocationsPerInstance allows the endpoint to react more quickly to changes in request volume, reducing the queueing that causes high p99 latency. Option A (increasing batch size) would actually increase latency. Option B (pre-warming) helps with cold starts but not queueing from traffic spikes.

Option C (GPU instance) is unlikely to help if the model is CPU-bound and would not address the root cause of latency variability.

438
MCQhard

A company is building a sentiment analysis model using Amazon SageMaker BlazingText. The training data consists of 100,000 product reviews. The data scientist wants to use the Word2Vec algorithm to generate word embeddings. Which configuration is required to use the continuous bag-of-words (CBOW) architecture?

A.Set the mode parameter to 'supervised'.
B.Set the mode parameter to 'batch_skipgram'.
C.Set the mode parameter to 'cbow'.
D.Set the mode parameter to 'skipgram'.
AnswerC

The 'cbow' mode enables the continuous bag-of-words architecture in BlazingText.

Why this answer

In BlazingText, the 'mode' parameter controls the training objective. Setting 'mode' to 'cbow' enables the continuous bag-of-words architecture. 'skipgram' is for skip-gram. 'batch_skipgram' is for large-scale skip-gram. 'supervised' is for text classification.

439
MCQhard

A data scientist is building a binary classification model to predict customer churn. The dataset is highly imbalanced, with only 5% of customers churning. The scientist evaluates several models using accuracy, precision, recall, and F1 score. Which metric is most appropriate for comparing model performance in this scenario?

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

In a highly imbalanced dataset with only 5% churn, accuracy is misleading because a model predicting all non-churn achieves 95% accuracy yet fails entirely at detecting churn. F1 score combines precision and recall via their harmonic mean, penalising extreme imbalance between false positives and false negatives. This directly addresses the constraint of class imbalance, rewarding models that correctly identify the minority churn class without sacrificing precision.

Why this answer

F1 score is the harmonic mean of precision and recall and is suitable for imbalanced datasets where accuracy can be misleading. Accuracy would be high even if the model predicts no churn ever (95% accuracy). Precision and recall each consider only one aspect, but F1 balances both.

440
Multi-Selecteasy

A data scientist is building a binary classification model to predict customer churn. The dataset has 10,000 samples with 500 churners (positive class). Which TWO techniques should be used to address the class imbalance? (Choose 2.)

Select 2 answers
A.Use a higher learning rate during training
B.Use L1 regularization on the model
C.Use random undersampling of the majority class
D.Use SMOTE to generate synthetic samples for the minority class
E.Use principal component analysis (PCA) to reduce dimensionality
AnswersC, D

Undersampling reduces majority class samples, balancing the dataset.

Why this answer

Random undersampling of the majority class (Option C) reduces the number of non-churner samples to balance the dataset, preventing the model from being biased toward the majority class. SMOTE (Option D) generates synthetic samples for the minority class by interpolating between existing minority instances, which increases the representation of churners without simply duplicating data. Both techniques directly address class imbalance by modifying the training data distribution.

Exam trap

The MLS-C01 exam often tests the misconception that regularization or dimensionality reduction can fix class imbalance, but these techniques address overfitting or computational efficiency, not skewed class distributions.

441
MCQeasy

A data scientist is training a binary classification model on a dataset where the positive class represents only 1% of the data. The model's accuracy is 99%, but the recall for the positive class is 0%. Which metric should the scientist use to evaluate the model's performance effectively?

A.Area under the ROC curve (ROC AUC)
B.Area under the Precision-Recall curve (PR AUC)
C.Accuracy
D.F1 score
AnswerB

PR AUC is robust to class imbalance.

Why this answer

In a highly imbalanced dataset where the positive class is only 1%, accuracy is misleading because a model can achieve 99% accuracy by simply predicting the negative class for all samples, resulting in 0% recall for the positive class. The Area under the Precision-Recall curve (PR AUC) is the correct metric because it focuses on the performance of the positive class by evaluating the trade-off between precision and recall, making it sensitive to changes in the minority class. Unlike ROC AUC, which can be overly optimistic in imbalanced settings due to the large number of true negatives, PR AUC provides a more realistic assessment of model performance for rare events.

Exam trap

The trap here is that candidates often choose ROC AUC (Option A) because it is a common default metric, but they fail to recognize that in severe class imbalance, ROC AUC can be artificially inflated by the dominance of true negatives, whereas PR AUC is the correct choice for evaluating minority class performance.

How to eliminate wrong answers

Option A is wrong because ROC AUC evaluates the trade-off between true positive rate and false positive rate, and in highly imbalanced datasets with a large number of true negatives, it can remain high even when the model fails to identify positive samples, giving a false sense of good performance. Option C is wrong because accuracy is a global metric that counts overall correct predictions; in this 1% positive class scenario, a model that always predicts the negative class achieves 99% accuracy but has 0% recall, making it completely useless for detecting the positive class. Option D is wrong because the F1 score, while better than accuracy, is a single threshold-dependent metric that can be misleading if the model's precision is high but recall is zero (F1 would be 0), and it does not capture performance across all thresholds like PR AUC does.

442
MCQeasy

A data scientist is using Amazon SageMaker to train a model and wants to automatically stop the training job if the loss does not improve for a certain number of epochs. Which SageMaker feature can be used for this purpose?

A.SageMaker Experiments
B.Custom early stopping callback in the training script
C.SageMaker Automatic Model Tuning
D.SageMaker Debugger
AnswerB

Implementing a custom callback that stops training when loss stagnates is the most direct method.

Why this answer

SageMaker provides built-in early stopping via the 'StoppingCondition' parameter in the training job definition, or through custom training scripts that use callbacks. The simplest way is to set MaxRuntimeInSeconds, but for early stopping based on loss, the data scientist should implement a custom callback in the training script.

443
MCQeasy

A company has deployed a real-time inference endpoint using SageMaker for a fraud detection model. The model uses a Random Forest classifier. The endpoint receives predictions but the latency is too high. The metric shows p99 latency of 500ms, but the requirement is under 200ms. The team has already optimized the instance type to the maximum allowed by their budget. The data scientist suggests: A) Reducing the number of trees in the Random Forest model. B) Switching to a linear model like Logistic Regression. C) Enabling SageMaker's batch transform instead of real-time endpoint. D) Adding more instances to the endpoint behind a load balancer. Which option will MOST effectively reduce latency while maintaining acceptable accuracy?

A.Switch to a linear model like Logistic Regression
B.Reduce the number of trees in the Random Forest model
C.Enable SageMaker's batch transform
D.Add more instances to the endpoint
AnswerB

Fewer trees mean faster inference, though accuracy may drop slightly; it's a direct latency reduction.

Why this answer

(Reducing the number of trees) is the most effective method to reduce latency while maintaining acceptable accuracy. Fewer trees directly decrease inference time of the Random Forest model, although it may slightly impact accuracy. Switching to a linear model (Option A) would reduce latency but likely result in significant accuracy loss.

Batch transform (Option C) is not suitable for real-time inference. Adding more instances (Option D) improves throughput but not per-request latency.

444
Multi-Selectmedium

Which TWO metrics are appropriate for evaluating a binary classification model when the cost of false negatives is high?

Select 2 answers
A.Accuracy
B.AUC-ROC
C.Recall
D.F1 score
E.Precision
AnswersC, D

Recall measures the proportion of actual positives correctly identified.

Why this answer

When false negatives are costly, we want to minimize them, so recall (true positive rate) is important. Precision is also important to avoid too many false positives, but F1 score balances both. Recall directly measures false negatives, and F1 combines precision and recall.

AUC-ROC is a general measure, and accuracy can be misleading. Therefore, the two appropriate metrics are Recall (option C) and F1 score (option D).

445
MCQhard

A machine learning engineer is using SageMaker to train an XGBoost model on a dataset with a severe class imbalance (1:1000). The goal is to maximize recall on the minority class. Which hyperparameter tuning strategy is MOST appropriate?

A.Set max_delta_step to a high value
B.Increase subsample ratio to 1.0
C.Set scale_pos_weight to the ratio of negative to positive samples
D.Set objective to 'binary:logistic' and tune max_depth
AnswerC

This parameter adjusts the weight of the minority class, improving recall.

Why this answer

XGBoost's 'scale_pos_weight' parameter can be set to the ratio of negative to positive instances to help the model focus on the minority class. Adjusting max_delta_step or subsample may help but are secondary. Setting objective to 'binary:logistic' is default, not addressing imbalance.

446
MCQmedium

Refer to the exhibit. A data scientist is configuring SageMaker Model Monitor for data quality checks. The configuration above is used. What is the purpose of the `ProbabilityThresholdAttribute` set to "0.5"?

A.It filters the input data to only include predictions above the threshold
B.It specifies the threshold for sampling data for monitoring
C.It sets the threshold for the accuracy metric
D.It defines the probability threshold used to convert model output to binary predictions for monitoring
AnswerD

This threshold is used to compute predicted labels for monitoring purposes.

Why this answer

In SageMaker Model Monitor, the `ProbabilityThresholdAttribute` parameter is used for binary classification models to define the probability threshold for converting model output probabilities (e.g., 0.7) to binary predictions (0 or 1). This threshold is used to monitor drift in the distribution of predictions over time, not to set the endpoint inference threshold. Option D correctly identifies this purpose.

Option A is incorrect because it does not filter input data; it only defines the threshold for converting probabilities to labels for monitoring. Option B is incorrect as it does not specify a sampling threshold; sampling is configured separately. Option C is incorrect because it does not set the accuracy metric threshold; accuracy is a separate metric.

447
MCQhard

A data scientist is building a recommender system using collaborative filtering. The dataset is sparse (99% missing values). Which algorithm is best suited?

A.Random Forest
B.K-Nearest Neighbors
C.Matrix Factorization (e.g., SVD)
D.Hidden Markov Model
AnswerC

Matrix factorization works well on sparse data.

Why this answer

Matrix factorization (e.g., SVD) is best suited for sparse collaborative filtering because it learns latent factors that capture underlying user-item interactions, effectively handling the 99% missing values by generalizing patterns rather than relying on explicit pairwise similarities. Unlike memory-based methods, it decomposes the sparse user-item matrix into lower-dimensional representations, enabling accurate predictions even when most entries are unobserved.

Exam trap

The MLS-C01 exam often tests the misconception that K-Nearest Neighbors (KNN) is the default for collaborative filtering, but the trap here is that extreme sparsity (99% missing) makes pairwise similarity calculations unreliable, whereas matrix factorization explicitly models latent factors to overcome data sparsity.

How to eliminate wrong answers

Option A is wrong because Random Forest is a supervised ensemble method that requires a dense feature matrix and cannot inherently handle missing values in a collaborative filtering context; it would fail to leverage the implicit feedback structure of the sparse user-item matrix. Option B is wrong because K-Nearest Neighbors (KNN) is a memory-based collaborative filtering approach that computes similarities between users or items, but with 99% missing values, pairwise distances become unreliable and the algorithm suffers from poor scalability and the 'curse of dimensionality'. Option D is wrong because Hidden Markov Model (HMM) is designed for sequential or temporal data with hidden states, not for static user-item interaction matrices; it does not model the latent factor structure needed for collaborative filtering in sparse settings.

448
Multi-Selecthard

Which TWO SageMaker features can be used to perform hyperparameter optimization? (Choose 2)

Select 2 answers
A.SageMaker Debugger
B.SageMaker Pipelines
C.SageMaker Model Monitor
D.SageMaker automatic model tuning
E.SageMaker Experiments
AnswersD, E

This is the built-in hyperparameter tuning service.

Why this answer

The correct answers are D (SageMaker automatic model tuning) and E (SageMaker Experiments). SageMaker automatic model tuning is the built-in feature that performs hyperparameter optimization by running multiple training jobs with different hyperparameter combinations. SageMaker Experiments can be used to track, organize, and analyze hyperparameter tuning jobs, including running multiple trials with different parameters, effectively performing HPO through manual or automated trial management.

SageMaker Debugger (A) monitors training metrics and conditions but does not perform HPO. SageMaker Pipelines (B) orchestrates workflows but is not a direct tuning feature. SageMaker Model Monitor (C) detects data drift in deployed models and is unrelated to HPO.

449
MCQeasy

During training of a SageMaker built-in object detection algorithm, the loss is not decreasing after several epochs. Which troubleshooting step should be taken first?

A.Increase the mini-batch size
B.Add more classes to the dataset
C.Check whether the learning rate is appropriate
D.Increase the number of epochs
AnswerC

Learning rate is a critical hyperparameter; incorrect value often causes loss not to decrease.

Why this answer

When the loss is not decreasing during training of a SageMaker built-in object detection algorithm, the most common cause is an inappropriate learning rate. A learning rate that is too high can cause the loss to oscillate or diverge, while one that is too low can cause the loss to plateau. Checking and adjusting the learning rate is the first troubleshooting step because it directly controls the step size of gradient updates and is a fundamental hyperparameter in optimization.

Exam trap

The trap here is that candidates often assume increasing the number of epochs (Option D) will always reduce loss, but they fail to recognize that a plateauing loss is typically a sign of a hyperparameter issue like learning rate, not insufficient training time.

How to eliminate wrong answers

Option A is wrong because increasing the mini-batch size typically stabilizes gradient estimates but does not directly address a plateauing loss; it can even slow convergence if the batch size becomes too large. Option B is wrong because adding more classes to the dataset increases task complexity and would likely worsen the loss, not help it decrease. Option D is wrong because increasing the number of epochs does not fix the underlying optimization issue; if the loss is not decreasing due to a poor learning rate, more epochs will simply continue the same ineffective training.

450
MCQmedium

A data scientist is using Amazon SageMaker to train a linear regression model. After training, the scientist notices that the model has a high bias. What is the most likely cause?

A.The training dataset has too many features
B.The model is too complex and overfits the data
C.The regularization parameter is too high
D.The model is too simple and underfits the data
AnswerD

Linear regression can underfit if relationship is nonlinear.

Why this answer

High bias indicates that the model is underfitting the training data, meaning it is too simple to capture underlying patterns. Option D correctly identifies this cause. Option A is incorrect because too many features typically lead to high variance (overfitting), not high bias.

Option B is incorrect because overfitting is associated with high variance, not high bias. Option C is incorrect because while an excessively high regularization parameter can increase bias, it is less likely than the model being too simple; regularization is designed to prevent overfitting, and its improper tuning is not the most common cause of high bias.

← PreviousPage 6 of 9 · 603 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Ml Modeling questions.