Courseiva

CCNA Modeling Questions

75 of 603 questions · Page 4/9 · Modeling · Answers revealed

226
MCQhard

A company uses Amazon SageMaker to train a model for fraud detection. The dataset has 1 million samples with 200 features. The data is highly imbalanced (0.1% fraud). The team wants to use a random forest model. Which technique should they use to handle the class imbalance during training?

A.Synthetic Minority Over-sampling Technique (SMOTE)
B.Use class weights inversely proportional to class frequencies
C.Random undersampling of the majority class
D.Adjust the decision threshold after training
AnswerA

SMOTE generates synthetic samples, effectively balancing the dataset.

Why this answer

SMOTE generates synthetic samples of the minority class, effectively balancing the dataset before training. This is particularly useful for random forest as it learns from the augmented data directly. Option B (class weights) adjusts the loss function but may not work well with random forest's tree-based structure, and it's not a standard technique for this algorithm.

Option C (undersampling) discards majority class data, potentially losing valuable information. Option D (threshold adjustment) is a post-training step and does not address imbalance during the training phase.

227
Multi-Selecthard

A data scientist is using Amazon SageMaker to train a deep learning model for natural language processing. The training job is taking too long to converge. The data scientist wants to speed up training without significantly sacrificing model accuracy. Which THREE strategies should the data scientist consider? (Choose three.)

Select 3 answers
A.Reduce the model size by using fewer layers or smaller hidden dimensions.
B.Increase the learning rate by a factor of 10 to accelerate convergence.
C.Increase the batch size to its maximum possible value to utilize GPU memory fully.
D.Use mixed precision training (FP16) to reduce memory and speed up matrix operations.
E.Use SageMaker's distributed data parallelism across multiple instances.
AnswersA, D, E

Smaller models train faster but may lose some accuracy.

Why this answer

Options A, D, and E are correct. Reducing the model size (A) decreases computational requirements and speeds up training. Mixed precision training (D) uses FP16 to reduce memory usage and accelerate matrix operations on GPUs.

Distributed data parallelism (E) allows training across multiple instances, significantly reducing training time. Option B (increasing learning rate by a factor of 10) is likely too aggressive and can cause divergence. Option C (increasing batch size to maximum) may slow convergence due to reduced gradient noise and can cause memory issues.

228
MCQmedium

A company is fine-tuning a BERT model on Amazon SageMaker for a text classification task. The training script uses PyTorch and Hugging Face Transformers. The training job completes successfully, but the final model accuracy is low. The dataset has 10,000 labeled samples. What is the most likely cause and solution?

A.The instance type is insufficient; use a larger instance
B.The model is overfitting due to small dataset; use a pre-trained checkpoint and fine-tune only top layers
C.The learning rate is too high; reduce it
D.The training script has a bug in the data loader
AnswerB

Correct. Fine-tuning the entire BERT model on only 10,000 samples leads to overfitting. Using a pre-trained checkpoint and fine-tuning only top layers reduces overfitting and improves accuracy.

Why this answer

Fine-tuning the entire BERT model on only 10,000 samples leads to overfitting, resulting in low accuracy. The recommended approach is to use a pre-trained checkpoint and fine-tune only the top layers, which leverages transfer learning and reduces the risk of overfitting. Option A (instance type) impacts training speed, not accuracy directly.

Option C (learning rate) could be a factor but overfitting is the most likely given the dataset size. Option D (data loader bug) would typically cause errors, not low accuracy without errors.

229
MCQeasy

A data scientist is using Amazon SageMaker to deploy a model for real-time inference. The model is a TensorFlow neural network. The scientist wants to use automatic scaling based on the number of incoming requests. Which service integration is required?

A.Amazon ECS with service auto scaling
B.Amazon SageMaker endpoint configured with Application Auto Scaling
C.AWS Lambda with provisioned concurrency
D.AWS Auto Scaling plans
AnswerB

SageMaker integrates with Application Auto Scaling to scale endpoints based on demand.

Why this answer

Amazon SageMaker endpoints natively integrate with Application Auto Scaling to adjust the number of instances based on a target metric, such as the number of incoming requests per instance. This allows the TensorFlow model to scale automatically in response to traffic, without needing additional orchestration services.

Exam trap

The trap here is that candidates may confuse SageMaker's built-in auto scaling with external services like ECS or Lambda, not realizing that SageMaker endpoints directly integrate with Application Auto Scaling for request-based scaling.

How to eliminate wrong answers

Option A is wrong because Amazon ECS with service auto scaling is used for container orchestration, not for scaling SageMaker endpoints; SageMaker manages its own infrastructure. Option C is wrong because AWS Lambda with provisioned concurrency is for serverless functions, not for deploying a TensorFlow neural network model for real-time inference via SageMaker. Option D is wrong because AWS Auto Scaling plans are a higher-level service for scaling multiple resources, but SageMaker endpoints require direct integration with Application Auto Scaling via a scaling policy, not a generic plan.

230
MCQmedium

An IAM policy attached to a SageMaker execution role is shown. A training job executed with this role fails with an error that the role cannot access the S3 bucket. The training job uses input data from s3://my-bucket/train/data.csv and output to s3://my-bucket/output/. What is the most likely cause?

A.The training job does not have s3:GetObject permission for the input data
B.The training data is encrypted with SSE-KMS and the role lacks KMS permissions
C.The training job does not have s3:PutObject permission for the output location
D.The S3 bucket is in a different region than the training job
AnswerC

The output path 'output/' is not covered by the resource 'train/*', so PutObject fails.

Why this answer

The error message indicates the role cannot access the S3 bucket, which typically occurs when the role lacks write permissions to the output location. The training job needs s3:PutObject permission to write the output artifacts (model, logs, etc.) to s3://my-bucket/output/. Without this permission, SageMaker fails to save the training results, resulting in an access error.

Exam trap

AWS often tests the distinction between read and write permissions in SageMaker S3 access, and the trap here is that candidates assume the error is about reading input data (Option A) when the actual failure is due to missing write permissions for the output location (Option C).

How to eliminate wrong answers

Option A is wrong because the error is about accessing the bucket, not specifically the input data; if s3:GetObject were missing, the error would likely be more specific to reading the input file, and the job would fail at the data loading stage, not with a general bucket access error. Option B is wrong because there is no mention of SSE-KMS encryption in the scenario; if the data were encrypted with KMS, the error would reference KMS permissions, not a generic S3 bucket access error. Option D is wrong because SageMaker training jobs can access S3 buckets in different regions as long as the bucket policy and IAM role allow cross-region access; the error message does not indicate a region mismatch, and SageMaker handles cross-region S3 access transparently.

231
Multi-Selecteasy

Which TWO of the following are valid Amazon SageMaker built-in algorithms for regression tasks? (Select TWO.)

Select 2 answers
A.BlazingText
B.XGBoost
C.Image Classification
D.Object Detection
E.Linear Learner
AnswersB, E

XGBoost supports regression.

Why this answer

XGBoost is a valid Amazon SageMaker built-in algorithm for regression tasks because it supports regression objectives such as 'reg:squarederror' and 'reg:logistic'. It is a gradient boosting framework that builds an ensemble of decision trees, making it suitable for both regression and classification problems.

Exam trap

The trap here is that candidates often confuse algorithms that can be used for regression (like XGBoost and Linear Learner) with those that are exclusively for classification or computer vision tasks, leading them to select BlazingText or Image Classification incorrectly.

232
MCQhard

A company is using a custom Docker container in SageMaker for training. The training job fails with 'ResourceLimitExceeded' error. Which action should the data scientist take?

A.Use a smaller instance type
B.Reduce the number of epochs
C.Request a limit increase for the instance type
D.Use a pre-built SageMaker container instead
AnswerC

Directly addresses the error.

Why this answer

The 'ResourceLimitExceeded' error in SageMaker indicates that the AWS account has reached a service quota for the specified instance type (e.g., ml.p3.2xlarge). This is a quota limit, not a performance or resource exhaustion issue within the training job itself. The correct action is to request a limit increase via the AWS Service Quotas console or AWS Support, which raises the maximum number of concurrent instances or total vCPUs allowed for that instance family.

Exam trap

AWS often tests the misconception that 'ResourceLimitExceeded' is a performance or memory error, leading candidates to choose instance downsizing or epoch reduction, when in fact it is a strict AWS account quota that must be raised through a formal request.

How to eliminate wrong answers

Option A is wrong because using a smaller instance type does not resolve a quota limit error; it only changes which quota is checked, and the smaller instance may still be subject to its own quota or may not meet the training job's memory/compute requirements. Option B is wrong because reducing the number of epochs addresses model convergence or training time, not the AWS service quota that limits the number or type of instances you can launch concurrently. Option D is wrong because switching to a pre-built SageMaker container does not affect instance quotas; the error is about resource limits at the AWS account level, not about container compatibility or image configuration.

233
MCQhard

A data scientist is using Amazon SageMaker to deploy a custom model container. The model is a large transformer that requires 16 GB of memory. The scientist wants to minimize inference latency. Which SageMaker hosting option should they choose?

A.Use a real-time endpoint with an instance that has sufficient memory.
B.Use an asynchronous inference endpoint.
C.Use SageMaker Serverless Inference.
D.Use a batch transform job.
AnswerA

Real-time endpoints provide low latency and can accommodate large models.

Why this answer

For a large model requiring 16GB memory and minimal inference latency, a real-time endpoint with a suitably sized instance (e.g., ml.p3.2xlarge or ml.g4dn.xlarge) provides dedicated resources and low latency. Option B (asynchronous inference) adds queuing latency and is for non-real-time. Option C (Serverless Inference) has memory limits (up to 6 GB) and may have cold starts, not suitable for a 16GB model.

Option D (batch transform) is for offline inference on batches, not real-time.

234
MCQeasy

A machine learning engineer is evaluating a binary classification model. The model has a high recall but low precision. Which of the following is the most likely consequence?

A.The model has many false positives.
B.The model has few false negatives.
C.The model misses many positive cases.
D.The model has few false positives.
AnswerA

Low precision means a high rate of false positives.

Why this answer

High recall means the model correctly identifies most positive cases (few false negatives), but low precision indicates that among the cases predicted as positive, many are actually negative. This directly implies a high number of false positives, as precision = TP/(TP+FP) and a low precision with high recall forces FP to be large relative to TP.

Exam trap

The MLS-C01 exam often tests the precision-recall trade-off by asking candidates to confuse the definitions of false positives and false negatives, leading them to incorrectly associate high recall with many false positives instead of few false negatives.

How to eliminate wrong answers

Option B is wrong because high recall implies few false negatives (FN is low), so this is a characteristic of the model, not a consequence of low precision. Option C is wrong because high recall means the model does NOT miss many positive cases; it captures most of them. Option D is wrong because low precision is defined by having many false positives, not few; few false positives would yield high precision.

235
Multi-Selecteasy

A data scientist is building a classification model and wants to evaluate its performance. Which TWO metrics are appropriate for a multi-class classification problem? (Choose 2)

Select 2 answers
A.Mean Absolute Error (MAE)
B.Recall
C.Precision
D.R-squared
E.Root Mean Square Error (RMSE)
AnswersB, C

Recall can be averaged across classes.

Why this answer

Both precision and recall can be extended to multi-class via micro/macro averaging. R-squared is for regression; RMSE is for regression; Mean Absolute Error is for regression.

236
MCQeasy

A machine learning engineer is training a regression model to predict house prices using Amazon SageMaker. The dataset contains 10,000 samples and 50 numerical features. After training a linear regression model, the engineer notices that the training loss is low, but the validation loss is high. The engineer suspects overfitting. The dataset is already normalized. Which action should the engineer take to reduce overfitting?

A.Increase the learning rate to speed up convergence.
B.Reduce the number of features using PCA.
C.Add L2 regularization (weight decay) to the loss function.
D.Decrease the mini-batch size during training.
AnswerC

Correct: L2 regularization penalizes large weights and reduces overfitting.

Why this answer

L2 regularization (weight decay) adds a penalty term to the loss function that discourages large weight values, effectively reducing model complexity and overfitting. Option A (increasing learning rate) can cause the model to diverge or overshoot minima, and does not directly prevent overfitting. Option B (PCA) reduces the number of features, which can help with overfitting but may discard important information; regularization is a more targeted approach for linear models.

Option D (decreasing mini-batch size) introduces more noise into gradient estimates, which can sometimes act as a regularizer but is less effective and reliable than L2 regularization for this scenario.

237
MCQeasy

A company is building a sentiment analysis model for customer reviews. The dataset includes 10,000 positive and 10,000 negative reviews. The data scientist splits the data into 70% training, 15% validation, and 15% test sets. After training, the model achieves 99% accuracy on training set but only 82% on validation set. What is the most likely issue?

A.There is data leakage from validation to training
B.The dataset is imbalanced
C.The model is underfitting
D.The model is overfitting
AnswerD

High training accuracy with significantly lower validation accuracy is a classic sign of overfitting.

Why this answer

The 99% training accuracy versus 82% validation accuracy indicates the model has memorized the training data but fails to generalize to unseen data, which is classic overfitting. Option D is correct. Option A is incorrect because data leakage would typically cause both training and validation accuracy to be high and similar.

Option B is incorrect because the dataset is balanced (10,000 positive and 10,000 negative). Option C is incorrect because underfitting would show low accuracy on both training and validation sets.

238
MCQeasy

During training, a binary classification model has an AUC of 0.99 on the training set but only 0.72 on the validation set. Which of the following is the most likely cause?

A.Class imbalance in the training set.
B.Underfitting.
C.Overfitting.
D.Data leakage from validation to training.
AnswerC

Overfitting results in high training but lower validation AUC.

Why this answer

A large gap between high training AUC (0.99) and lower validation AUC (0.72) indicates overfitting. Option A is wrong: class imbalance would affect both sets similarly or the model might ignore the minority class, but would not typically produce such a large gap. Option B is wrong: underfitting would show poor performance on both sets (e.g., AUC around 0.5-0.6).

Option D is wrong: data leakage would inflate both training and validation metrics, not create a gap.

239
MCQeasy

A data scientist is building a regression model to predict house prices. The dataset contains features like 'number_of_rooms' (integer), 'sqft' (float), 'location' (categorical with 1000 unique values). Which feature engineering approach is BEST for the 'location' feature?

A.Remove the feature
B.Target encoding
C.One-hot encoding
D.Label encoding
AnswerB

Target encoding uses mean target per category, good for high cardinality.

Why this answer

Target encoding is the best approach for the 'location' feature because it has 1,000 unique categories, making one-hot encoding infeasible (would create 1,000 dummy columns) and label encoding inappropriate (imposes arbitrary ordinal relationships). Target encoding replaces each category with the mean of the target variable (house price) for that category, capturing the predictive signal of location while keeping the feature as a single numeric column. This balances model performance with dimensionality and avoids overfitting when regularized (e.g., with smoothing or cross-validation).

Exam trap

AWS often tests the trade-off between cardinality and encoding methods, and the trap here is that candidates default to one-hot encoding as the 'standard' categorical encoding without considering the practical infeasibility of high cardinality, or they choose label encoding thinking it is a simple numeric mapping, ignoring the ordinal assumption violation.

How to eliminate wrong answers

Option A is wrong because removing the 'location' feature discards a highly predictive signal — house prices are strongly influenced by location, and a model without it would likely underfit. Option C is wrong because one-hot encoding with 1,000 unique categories would create 999 dummy variables, drastically increasing dimensionality, memory usage, and risk of the curse of dimensionality, especially in regression models. Option D is wrong because label encoding assigns arbitrary integer labels (e.g., 1, 2, 3) to categories, implying an ordinal relationship that does not exist for location, which can mislead linear regression models into treating distant locations as numerically similar.

240
MCQeasy

A data scientist is training a random forest model on a dataset with 50 features. After training, the model achieves 98% accuracy on the training set but only 85% on the test set. Which technique is most appropriate to reduce the generalization error?

A.Apply Principal Component Analysis (PCA) to reduce dimensionality
B.Add more training data
C.Increase the number of trees in the forest
D.Reduce the maximum depth of each tree
AnswerD

Shallow trees are simpler and less likely to overfit, thus improving test accuracy.

Why this answer

The gap indicates overfitting. Random forest can overfit if trees are too deep or if the number of trees is too high. Reducing the maximum depth of trees limits model complexity and helps generalization.

Increasing the number of trees typically reduces overfitting but can also increase computational cost; however, reducing depth is more direct. Feature selection or PCA might help but are less direct than controlling tree complexity.

241
MCQeasy

Refer to the exhibit. The log shows the end of a successful SageMaker training job. However, the ML engineer cannot find the model artifacts in the specified S3 bucket. What is the most likely cause?

A.The IAM role used by the training job does not have permission to write to the S3 bucket.
B.The S3 bucket does not exist.
C.The model artifacts were uploaded to a different S3 path.
D.The training job did not have network access to S3.
AnswerA

Without s3:PutObject, the upload fails.

Why this answer

The training job completed successfully, meaning the SageMaker training container executed without errors. However, if the model artifacts are not found in the specified S3 bucket, the most likely cause is that the IAM role associated with the training job lacks the necessary s3:PutObject permission for that bucket. SageMaker uses the role's credentials to write the output; without write access, the artifacts are silently dropped or fail to upload, even though the training code itself may have run to completion.

Exam trap

AWS often tests the misconception that a successful training job log implies the model artifacts were successfully uploaded, when in fact the IAM role permissions are the gatekeeper for S3 write operations, and a missing permission can cause silent failures.

How to eliminate wrong answers

Option B is wrong because if the S3 bucket did not exist, SageMaker would raise a bucket-not-found error during the training job initialization, and the job would fail, not complete successfully. Option C is wrong because the model artifacts are written to the exact S3 path specified in the OutputDataConfig parameter of the training job; SageMaker does not randomly choose a different path. Option D is wrong because if the training job lacked network access to S3, it would fail to download training data or upload output, resulting in a job failure, not a successful completion with missing artifacts.

242
MCQhard

A company is deploying a machine learning model for real-time fraud detection. The model must have low latency (under 100 ms) and high throughput. The model is an ensemble of 5 gradient boosted trees (XGBoost), each 200 MB. Which deployment strategy is MOST suitable?

A.Use AWS Lambda to invoke each model sequentially.
B.Deploy each model as a separate SageMaker endpoint and use a load balancer.
C.Deploy the ensemble on a single GPU instance with large batch processing.
D.Use SageMaker multi-model endpoint on a compute-optimized instance.
AnswerD

A multi-model endpoint on a compute-optimized instance allows loading multiple models dynamically, reducing cost and latency compared to separate endpoints.

Why this answer

A multi-model endpoint on a compute-optimized instance allows loading multiple models dynamically, reducing cost and latency compared to separate endpoints. Option A is wrong because invoking each model sequentially with Lambda would incur overhead and cold start latency, exceeding the 100 ms requirement. Option B is wrong because deploying each model as a separate SageMaker endpoint would require managing multiple endpoints, increasing cost and complexity without benefiting from model sharing on a single instance.

Option C is wrong because batch processing is not suitable for real-time inference; GPU instances are overkill for tree-based models and add latency.

243
MCQeasy

A data scientist is reviewing the training logs from a SageMaker training job. The logs show training and validation loss per epoch. Based on the exhibited logs, which statement is correct?

A.The model is not learning because the loss is not decreasing
B.The model is underfitting because both losses are high
C.The model is performing well because validation loss is stable
D.The model is overfitting because training loss decreases while validation loss does not
AnswerD

Classic overfitting: training loss improves, validation loss stagnates.

Why this answer

The training logs show a classic overfitting pattern: training loss consistently decreases across epochs, indicating the model is memorizing the training data, while validation loss does not decrease (or may even increase), indicating poor generalization to unseen data. In SageMaker, monitoring both losses during training is critical to detect overfitting early, often prompting regularization or early stopping.

Exam trap

The trap here is that candidates see decreasing training loss and assume the model is learning well, ignoring the validation loss plateau or increase, which is the hallmark of overfitting.

How to eliminate wrong answers

Option A is wrong because the loss is decreasing (training loss goes down), so the model is learning; the issue is not lack of learning but divergence between training and validation performance. Option B is wrong because underfitting would show both training and validation losses remaining high and not decreasing, whereas here training loss decreases significantly. Option C is wrong because a stable validation loss alone does not indicate good performance if training loss is decreasing while validation loss is not improving—this divergence signals overfitting, not good generalization.

244
MCQeasy

A machine learning team is using Amazon SageMaker to build a regression model. The target variable is heavily right-skewed with a long tail. Which data transformation should the team apply to the target variable before training?

A.One-hot encoding
B.Min-max scaling
C.Log transformation
D.Standardization (z-score)
AnswerC

Log transform reduces right skew and makes distribution more normal.

Why this answer

A log transformation compresses the range of the target and makes the distribution more symmetric, improving model performance.

245
MCQmedium

A healthcare company is building a model to predict patient readmission within 30 days of discharge. The dataset includes 10,000 patient records with 200 features, including lab results, demographics, and historical admissions. The target variable is highly imbalanced: only 8% of patients are readmitted. The data scientist splits the data into 80% training and 20% test sets, ensuring the same proportion of readmissions in each. The scientist trains a logistic regression model and a random forest model. The logistic regression achieves 92% accuracy but recall of 10% for the readmitted class. The random forest achieves 90% accuracy but recall of 25%. The business requirement is to achieve at least 60% recall for readmissions while maintaining reasonable precision. The scientist also has access to a large collection of unlabeled patient records from other hospitals. Which strategy should the data scientist use to meet the business requirement?

A.Collect more labeled data from other hospitals.
B.Use SMOTE to oversample the minority class in the training set.
C.Use random undersampling of the majority class in the training set.
D.Switch to a deep neural network with more layers.
AnswerB

SMOTE creates synthetic samples to balance classes.

Why this answer

Using SMOTE (Synthetic Minority Over-sampling Technique) generates synthetic samples for the minority class, which can improve recall. Option A is wrong because collecting more data may not be feasible and may not help if imbalance persists. Option C is wrong because undersampling reduces data and may lose information.

Option D is wrong because changing to a deep learning model may not help with limited data.

246
MCQmedium

A data scientist is training a deep learning model on a large dataset using Amazon SageMaker. The training job is taking too long. Which action would MOST likely reduce training time without sacrificing model accuracy?

A.Use a smaller instance type for training
B.Implement early stopping with a low patience value
C.Enable data parallelism across multiple GPUs
D.Reduce the number of epochs by half
AnswerC

Data parallelism distributes data across GPUs, reducing training time while preserving accuracy.

Why this answer

Enabling data parallelism across multiple GPUs distributes the training workload across several devices, allowing larger batch sizes and faster gradient computation per epoch. Amazon SageMaker's distributed training libraries (e.g., SageMaker Data Parallelism) use all-reduce algorithms to synchronize gradients efficiently, which reduces wall-clock training time without altering the model architecture or loss function, thus preserving accuracy.

Exam trap

The trap here is that candidates may confuse reducing training time with reducing computational load (e.g., smaller instance or fewer epochs), but the question specifically requires maintaining accuracy, which distributed parallelism achieves by leveraging more hardware rather than cutting corners in the training process.

How to eliminate wrong answers

Option A is wrong because using a smaller instance type reduces computational resources (CPU/GPU memory and throughput), which increases per-iteration time and may force smaller batch sizes, potentially slowing convergence or even degrading accuracy due to underfitting. Option B is wrong because implementing early stopping with a low patience value risks halting training prematurely before the model has converged, which can sacrifice accuracy by underfitting the data. Option D is wrong because reducing the number of epochs by half arbitrarily cuts training short without regard to convergence criteria, likely resulting in an underfit model with lower accuracy.

247
MCQmedium

Refer to the exhibit. A data scientist runs the AWS CLI command to create a SageMaker training job. The job fails immediately with 'ValidationException: Invalid instance type'. What is the most likely issue?

A.The IAM role ARN is invalid
B.The S3 bucket 'my-bucket' does not exist or the role lacks permissions
C.The instance type ml.m5.large does not support the XGBoost image
D.The training image URI is for a different AWS region
AnswerD

The account ID corresponds to us-east-1, but the CLI command is running in us-west-2.

Why this answer

The error 'ValidationException: Invalid instance type' occurs because the training image URI specified in the command points to an Amazon ECR repository in a different AWS region than where the SageMaker training job is being created. SageMaker validates that the image URI is accessible from the current region; if the URI references a region that does not contain the XGBoost image or the instance type is not supported in that region's ECR, the validation fails. The instance type itself (ml.m5.large) is valid for XGBoost, but the mismatch between the image's region and the job's region triggers the exception.

Exam trap

The trap here is that candidates assume 'Invalid instance type' always means the instance is unsupported by the algorithm, when in reality SageMaker uses this generic error for any validation failure related to the training job's resource configuration, including regional mismatches in the image URI.

How to eliminate wrong answers

Option A is wrong because an invalid IAM role ARN would cause an 'AccessDeniedException' or 'InvalidParameterValue' error, not a 'ValidationException' specifically about the instance type. Option B is wrong because a missing S3 bucket or insufficient permissions would result in a 'ClientError: 404 Not Found' or 'AccessDenied' during data download, not a validation error at job creation. Option C is wrong because ml.m5.large is a supported instance type for the XGBoost algorithm in SageMaker; the error is not about instance type compatibility with the image but about the image URI's regional mismatch.

248
MCQeasy

A data scientist is training a binary classifier using logistic regression. The dataset has 100 features and 1 million samples. After training, the model achieves AUC of 0.85 on the test set. The business wants to understand which features contribute most to predictions. Which technique should the data scientist use?

A.Use t-SNE to visualize feature importance
B.Use the coefficients of the logistic regression model as feature importance
C.Use a random forest model and its feature importance attribute
D.Use Principal Component Analysis (PCA) to find important components
AnswerB

Logistic regression coefficients indicate direction and magnitude of feature impact.

Why this answer

Coefficients of logistic regression are natural measures of feature importance.

249
MCQmedium

A company is building a recommendation system for an e-commerce platform. They have user-item interaction data (clicks, purchases) and want to use matrix factorization. They plan to use Amazon SageMaker to train the model. Which dataset format is MOST appropriate for the built-in Factorization Machines algorithm?

A.Libsvm format with user_id and item_id as features
B.CSV file with user_id, item_id, and label columns
C.RecordIO-protobuf with user_id, item_id, and label fields
D.JSON lines file with user_id, item_id, and label fields
AnswerC

RecordIO-protobuf is the required format for SageMaker's built-in Factorization Machines.

Why this answer

The built-in Factorization Machines algorithm in Amazon SageMaker requires the RecordIO-protobuf format for optimal performance, as it allows efficient binary serialization and direct integration with SageMaker's distributed training infrastructure. This format supports sparse data representation, which is critical for high-dimensional user-item interaction data, and enables faster I/O and reduced memory overhead compared to text-based formats.

Exam trap

The trap here is that candidates often assume libsvm or CSV are universally optimal for sparse data, but SageMaker's built-in Factorization Machines specifically requires RecordIO-protobuf for native sparse tensor support and maximum performance, not just any text-based sparse format.

How to eliminate wrong answers

Option A is wrong because libsvm format, while common for linear models and SVM, is not natively supported by SageMaker's built-in Factorization Machines algorithm; the algorithm expects RecordIO-protobuf or CSV, but libsvm lacks the protobuf efficiency and sparse tensor handling required for optimal training. Option B is wrong because CSV format, though supported, is less efficient for large-scale sparse data due to text parsing overhead and lack of native sparse encoding, making it suboptimal for matrix factorization tasks with millions of user-item pairs. Option D is wrong because JSON lines format is not supported by the built-in Factorization Machines algorithm; SageMaker's built-in algorithms require either RecordIO-protobuf or CSV for training, and JSON lines would require custom preprocessing or a custom container.

250
MCQhard

A team is training a large deep learning model on Amazon SageMaker. The training job is taking too long and they want to reduce training time without changing the model architecture. Which action is MOST effective?

A.Switch to a compute-optimized instance like c5.4xlarge
B.Use a GPU instance (e.g., p3.2xlarge) for training
C.Increase the batch size and learning rate proportionally
D.Use SageMaker Automatic Model Tuning with hyperparameter optimization
AnswerB

GPUs dramatically speed up matrix operations common in deep learning.

Why this answer

Using a SageMaker managed training instance with GPU (e.g., p3.2xlarge) provides significant acceleration for deep learning models due to parallel processing.

251
Multi-Selectmedium

A data scientist is training a neural network for image classification. The training loss decreases but validation loss increases after a few epochs. Which TWO actions should be taken to address this?

Select 2 answers
A.Implement early stopping based on validation loss.
B.Increase the learning rate.
C.Increase the dropout rate.
D.Increase the number of epochs.
E.Add more convolutional layers.
AnswersA, C

Early stopping prevents overfitting by halting training when validation loss stops improving.

Why this answer

Early stopping monitors validation loss and halts training when it stops improving, preventing overfitting. This directly addresses the symptom of decreasing training loss with increasing validation loss, which is a classic sign of overfitting.

Exam trap

AWS often tests the distinction between underfitting and overfitting solutions, where candidates mistakenly choose capacity-increasing options (like more layers or epochs) when the problem is overfitting, not underfitting.

252
MCQhard

A machine learning team is using Amazon SageMaker to train a large language model. The training script uses PyTorch and the model requires significant memory. The team wants to use model parallelism across multiple GPUs. Which SageMaker feature should they use?

A.SageMaker Distributed Training
B.SageMaker model parallelism library
C.SageMaker Horovod
D.SageMaker Debugger
AnswerB

SMP is specifically designed for model parallelism.

Why this answer

SageMaker's model parallelism library (SMP) is designed for distributed training of large models across GPUs. Horovod is for data parallelism, not model parallelism. SageMaker Debugger is for monitoring training.

Distributed Training is a generic term; the specific library is SMP.

253
MCQeasy

A data scientist is training a neural network for image classification. The training loss is decreasing steadily, but the validation loss starts increasing after a few epochs. What is the MOST likely cause?

A.The learning rate is too high
B.The gradients are vanishing
C.The model is underfitting
D.The model is overfitting to the training data
AnswerD

Overfitting causes validation loss to increase.

Why this answer

The validation loss increasing while the training loss continues to decrease is the classic signature of overfitting. The model is memorizing the training data (including noise) rather than learning generalizable patterns, causing it to perform poorly on unseen validation data.

Exam trap

AWS often tests the distinction between overfitting and underfitting by describing a scenario where training loss decreases but validation loss increases, and the trap is that candidates may mistakenly attribute this to a high learning rate or vanishing gradients instead of recognizing it as the hallmark of overfitting.

How to eliminate wrong answers

Option A is wrong because a learning rate that is too high typically causes the training loss to oscillate or diverge, not steadily decrease while validation loss increases. Option B is wrong because vanishing gradients prevent the model from learning at all, resulting in stagnant training loss, not a decreasing training loss with increasing validation loss. Option C is wrong because underfitting means the model fails to capture patterns in the training data, leading to high training loss that does not decrease adequately, which contradicts the described steady decrease in training loss.

254
MCQmedium

Refer to the exhibit. An IAM policy is attached to a SageMaker execution role. A data scientist tries to create a training job that reads training data from s3://my-bucket/confidential/data.csv. What will happen?

A.The training job will succeed because there is an Allow on my-bucket/*
B.The training job will succeed because the Deny statement is invalid
C.The training job will fail because the role lacks sagemaker:CreateTrainingJob
D.The training job will fail with an access denied error
AnswerD

The Deny statement blocks access to the confidential prefix.

Why this answer

The policy allows s3:GetObject on my-bucket/* but explicitly denies s3:GetObject on my-bucket/confidential/*. Since explicit Deny overrides any Allow, the training job will fail with an access denied error.

255
MCQeasy

A data scientist is using Amazon SageMaker to train a linear regression model. The dataset has 500 features and 50,000 observations. The model converges but has high bias. Which technique should the data scientist use to reduce bias?

A.Apply L2 regularization (Ridge) to penalize large coefficients.
B.Add polynomial features or interaction terms to the feature set.
C.Decrease the learning rate.
D.Use feature selection to remove irrelevant features.
E.Increase the number of training epochs.
AnswerB

Increasing model complexity reduces bias.

Why this answer

Adding interaction features or polynomial features allows the linear model to capture non-linear relationships, reducing bias. Option A (L2 regularization/ridge) penalizes large coefficients, which primarily reduces variance, not bias. Option C (decreasing the learning rate) affects the step size during gradient descent, influencing convergence speed and stability, but does not directly reduce bias.

Option D (feature selection) removes irrelevant features, which can reduce overfitting (variance) and may increase bias if important features are removed. Option E (increasing the number of training epochs) gives the model more iterations to converge, but if the model already converges, more epochs won't reduce bias; it might reduce underfitting if the model hasn't fully converged, but typically bias is addressed by model complexity.

256
MCQmedium

A data scientist is training a binary classifier on an imbalanced dataset where the positive class represents only 2% of the data. The model achieves 99% accuracy but only identifies 5% of actual positives. Which metric should the scientist use to evaluate the model's ability to detect the positive class?

A.Accuracy
B.F1-score
C.Precision
D.Recall
AnswerD

Recall directly measures the fraction of actual positives captured.

Why this answer

Recall (sensitivity) measures the proportion of actual positives correctly identified, which is the key concern here. Accuracy is misleading due to class imbalance.

257
MCQeasy

Refer to the exhibit. A data scientist wants to update the endpoint to use a new model image. The scientist updates the endpoint configuration with the new image and calls UpdateEndpoint. After the update, the endpoint status is 'Updating' but remains in that state for a long time. What is the most likely cause?

A.The new model image is failing health checks
B.The endpoint is already InService, so it cannot be updated
C.The old model image is no longer available
D.The instance count is too low to deploy both variants
AnswerA

SageMaker waits for the new variant to pass health checks; failure can cause indefinite updating.

Why this answer

Blue/green deployment requires the new model to be healthy before traffic is shifted. If the new model fails health checks, the update may hang. Option B is wrong because the endpoint is updating, not failed.

Option C is wrong because the old model is still running. Option D is wrong because there is no indication of insufficient capacity.

258
Multi-Selecthard

A machine learning engineer is evaluating a classification model that predicts whether a transaction is fraudulent. The model outputs a probability score. The cost of a false negative (missed fraud) is 10 times higher than the cost of a false positive (false alarm). Which TWO evaluation metrics should the engineer use to tune the model? (Choose TWO.)

Select 2 answers
A.F-beta score with beta = 2
B.Accuracy
C.Log loss
D.ROC-AUC
E.Precision-Recall curve
AnswersA, E

F-beta with beta > 1 weights recall higher than precision, matching the cost structure.

Why this answer

Precision-Recall curve (E) is well-suited for imbalanced datasets and when the positive class (fraud) is rare; it directly evaluates the trade-off between precision and recall. F-beta score with beta = 2 (A) weights recall twice as much as precision, aligning with the higher cost of false negatives. Accuracy (B) is misleading for imbalanced data and does not incorporate costs.

ROC-AUC (D) can be overly optimistic on imbalanced data and is less sensitive to the cost of false negatives. Log loss (C) measures probabilistic calibration but does not directly reflect the asymmetric cost structure.

259
Multi-Selecthard

A company is using Amazon SageMaker to train a large language model. The training job is taking too long. The data scientist wants to reduce training time without sacrificing model accuracy. Which THREE strategies are MOST appropriate?

Select 3 answers
A.Use mixed precision training (float16)
B.Increase the batch size to utilize GPU memory more efficiently
C.Switch from GPU instance to CPU instance
D.Increase the maximum sequence length
E.Use gradient accumulation to increase effective batch size
AnswersA, B, E

Mixed precision reduces memory and speeds up training on GPUs.

Why this answer

Mixed precision training (float16) reduces memory usage and accelerates computation by using half-precision floating-point numbers for most operations, while maintaining a single-precision copy of critical parameters to preserve accuracy. This directly reduces training time on compatible GPUs (e.g., NVIDIA V100, A100) without sacrificing model quality, as the loss scaling technique prevents underflow in gradients.

Exam trap

The MLS-C01 exam often tests the misconception that increasing batch size always speeds up training, but without gradient accumulation, a larger batch size may exceed GPU memory limits and cause out-of-memory errors, while gradient accumulation safely simulates a larger batch size without increasing memory usage.

260
MCQhard

A data scientist is using Amazon SageMaker to train a gradient boosting model on a dataset with categorical features. The dataset contains a column 'UserID' with over 1 million unique values. The training is taking very long and the model size is large. Which technique would MOST effectively reduce training time and model size while maintaining accuracy?

A.Use one-hot encoding on UserID.
B.Apply feature hashing to UserID.
C.Use label encoding for UserID.
D.Remove UserID from the dataset.
AnswerB

Feature hashing maps user IDs to a fixed number of buckets (e.g., 2^14), reducing dimensionality and preserving some signal.

Why this answer

Hashing reduces the number of distinct categories to a fixed number of buckets, controlling dimensionality. Option A is wrong because one-hot encoding would explode the feature space. Option C is wrong because label encoding creates ordinal relationships that may mislead the model.

Option D is wrong because removing UserID likely loses important signal.

261
MCQeasy

A company is using Amazon SageMaker to deploy a model for real-time inference. The model is updated frequently. Which deployment strategy allows for zero-downtime updates and easy rollback?

A.Canary deployment
B.A/B testing with production variants
C.Blue/green deployment using endpoint updates
D.Multi-model endpoint
AnswerC

Blue/green deployment provides zero-downtime updates and rollback.

Why this answer

SageMaker's blue/green deployment (using endpoint updates with production variants) allows traffic shifting and rollback. A/B testing is for testing variants, not zero-downtime updates by itself. Canary deployment is a type of blue/green but not a separate AWS feature.

Multi-model endpoints are for hosting multiple models.

262
MCQmedium

A data scientist is training a recurrent neural network (RNN) for time series forecasting. The training loss decreases steadily for the first 10 epochs, then plateaus. The validation loss starts increasing after epoch 10. What is the most appropriate action?

A.Stop training early and use the model from epoch 10
B.Continue training for more epochs
C.Add more layers to the network
D.Increase the batch size
AnswerA

Early stopping prevents overfitting; the model at epoch 10 generalizes better.

Why this answer

The validation loss increasing while training loss decreases indicates overfitting. Early stopping halts training before overfitting worsens, preserving the model that performed best on validation data (epoch 10). Option B (continuing training) would increase overfitting.

Option C (adding layers) may exacerbate overfitting. Option D (increasing batch size) is not directly addressing overfitting and may not help.

263
MCQhard

A data scientist is training a convolutional neural network (CNN) for image classification using Amazon SageMaker. The training loss decreases steadily but validation loss starts increasing after a few epochs. Which action should the data scientist take to address this issue?

A.Increase the learning rate
B.Add more convolutional layers
C.Increase the batch size
D.Implement early stopping based on validation loss
AnswerD

Early stopping prevents overfitting by stopping training when validation loss plateaus or increases.

Why this answer

The described behavior—training loss decreasing while validation loss increases—is a classic sign of overfitting. Early stopping monitors the validation loss and halts training when it stops improving (or starts to increase), preventing the model from memorizing noise in the training data. In SageMaker, this can be implemented using the `EarlyStopping` callback in the framework's estimator or by setting `use_early_stopping` to True in a built-in algorithm.

Exam trap

The trap here is that candidates confuse overfitting with underfitting and choose to increase model complexity (Option B) or learning rate (Option A), not recognizing that rising validation loss signals the need to stop training rather than continue with more capacity.

How to eliminate wrong answers

Option A is wrong because increasing the learning rate would make the optimizer take larger steps, which can cause the loss to diverge or oscillate, worsening overfitting rather than fixing it. Option B is wrong because adding more convolutional layers increases model capacity, which typically exacerbates overfitting when validation loss is already rising. Option C is wrong because increasing the batch size provides a more accurate gradient estimate but does not directly address overfitting; it may even lead to sharper minima and poorer generalization.

264
Multi-Selecteasy

A data scientist is using Amazon SageMaker to train a linear regression model. The dataset has outliers. Which TWO techniques can help reduce the impact of outliers? (Choose TWO.)

Select 2 answers
A.Trim the dataset to remove extreme values
B.Add more features
C.Apply L1 regularization
D.Use Huber loss instead of squared error
E.Standardize the features
AnswersA, D

Removing outliers reduces their influence on the model.

Why this answer

Options A and D are correct. Huber loss is robust to outliers, and trimming the dataset removes extreme values. Option B (more features) is not relevant for handling outliers.

Option C (L1 regularization) reduces overfitting but not outlier impact. Option E (standardization) does not handle outliers.

265
MCQhard

A team is using Amazon SageMaker to train a model. The training job repeatedly fails with a 'ResourceLimitExceeded' error. Which action should the team take to resolve this issue?

A.Request a service limit increase for SageMaker resources.
B.Reduce the size of the training dataset.
C.Switch to using Spot Instances.
D.Use a different instance type with less memory.
AnswerA

ResourceLimitExceeded indicates the account limit has been reached; requesting an increase is the standard resolution.

Why this answer

The 'ResourceLimitExceeded' error in Amazon SageMaker indicates that the AWS account has reached a service quota for SageMaker resources, such as the number of concurrent training jobs, total instance count, or specific instance types. The correct action is to request a service limit increase via the AWS Service Quotas console or by contacting AWS Support, as this directly addresses the quota cap causing the failure.

Exam trap

The trap here is that candidates confuse resource limits with performance or cost issues, leading them to choose dataset reduction, Spot Instances, or smaller instance types, when the root cause is a hard AWS service quota that must be increased.

How to eliminate wrong answers

Option B is wrong because reducing the size of the training dataset does not affect the service quota limits; it might reduce training time or cost but will not resolve a 'ResourceLimitExceeded' error, which is a quota-based issue. Option C is wrong because switching to Spot Instances can reduce cost but does not increase the account's resource limits; Spot Instances are still subject to the same service quotas for instance count and concurrent jobs. Option D is wrong because using a different instance type with less memory does not change the fact that the account has hit a resource limit; the error is about exceeding a quota, not about memory capacity.

266
MCQhard

A research team is training a deep learning model for image classification using Amazon SageMaker. The model is a convolutional neural network (CNN) with 50 layers. The team uses a single ml.p3.2xlarge instance. After 10 hours of training, the model has not converged and the loss is decreasing very slowly. The team suspects vanishing gradients. They want to diagnose and fix the issue without significant code changes. Which action should they take?

A.Add more convolutional layers to increase model capacity
B.Modify the architecture to include residual connections (skip connections)
C.Use batch normalization after each convolutional layer
D.Increase the learning rate by a factor of 10
AnswerB

Residual connections allow gradients to flow directly through the network.

Why this answer

(Modify the architecture to include residual connections) directly addresses vanishing gradients by allowing gradients to flow through skip connections. Option A (adding more layers) worsens the problem. Option C (batch normalization) helps but is not as targeted as residual connections.

Option D (increase learning rate) may cause divergence.

267
MCQeasy

A data scientist is training a text classification model using a bag-of-words approach. The dataset contains 1 million documents and 100,000 unique words. The resulting feature matrix is very sparse. Which technique should the data scientist use to reduce the dimensionality of the feature space?

A.Apply TF-IDF transformation
B.Use word embeddings to represent documents
C.Remove stop words from the vocabulary
D.Apply Principal Component Analysis (PCA) to the term-document matrix
AnswerB

Word embeddings create dense low-dimensional vectors, reducing sparsity and dimensionality.

Why this answer

Word embeddings (e.g., Word2Vec, GloVe) map words to dense, low-dimensional vectors that capture semantic relationships, effectively reducing the 100,000-dimensional sparse bag-of-words feature space to a much smaller dense representation (e.g., 100–300 dimensions). This directly addresses the sparsity and high dimensionality of the term-document matrix while preserving meaningful word context.

Exam trap

The trap here is that candidates confuse TF-IDF (a reweighting technique) with dimensionality reduction, or assume PCA can be directly applied to sparse text matrices without considering computational cost and loss of interpretability.

How to eliminate wrong answers

Option A is wrong because TF-IDF is a weighting scheme that reweights term frequencies based on inverse document frequency, but it does not reduce the number of features; the feature space remains 100,000 dimensions and still sparse. Option C is wrong because removing stop words reduces the vocabulary size only marginally (typically a few hundred words) and does not significantly reduce the 100,000 unique words or address the sparsity of the feature matrix. Option D is wrong because PCA is a linear dimensionality reduction technique that is computationally infeasible on a 1 million × 100,000 sparse matrix (dense covariance matrix would be 100k × 100k) and destroys the sparse structure without capturing semantic relationships.

268
Multi-Selecthard

A data scientist is tuning a gradient boosting model using Amazon SageMaker Automatic Model Tuning (AMT). Which THREE hyperparameters should the scientist consider tuning to reduce overfitting? (Select THREE.)

Select 3 answers
A.Subsample ratio
B.Learning rate (eta)
C.Minimum child weight (min_child_weight)
D.Gamma (minimum loss reduction)
E.Maximum depth (max_depth)
AnswersB, C, D

Lower learning rate reduces overfitting.

Why this answer

Learning rate (eta) controls the contribution of each tree to the ensemble. A lower learning rate forces the model to learn more slowly, requiring more trees but reducing the risk of overfitting by preventing any single tree from having too much influence on the final prediction.

Exam trap

The trap here is that candidates often assume all listed hyperparameters are equally effective for reducing overfitting, but the exam expects knowledge that subsample ratio and maximum depth are also valid regularization parameters, yet the question specifically selects min_child_weight, gamma, and learning rate as the three to focus on.

269
Multi-Selectmedium

A company is building a sentiment analysis model for customer reviews. The dataset is balanced with 10,000 positive and 10,000 negative reviews. The model achieves 95% accuracy on the test set but fails to generalize to new reviews from a different product category. Which TWO techniques can improve generalization?

Select 2 answers
A.Increase the training dataset size by collecting more reviews
B.Use stratified k-fold cross-validation during training
C.Apply L2 regularization to the model
D.Add more features like review length and word count
E.Use a more complex model with more layers
AnswersB, C

Cross-validation provides a more reliable estimate of generalization and helps tune hyperparameters.

Why this answer

Stratified k-fold cross-validation ensures that each fold maintains the same class distribution as the original dataset, which helps the model learn more robust patterns across different subsets of data. This technique reduces variance in the evaluation and improves generalization to unseen data from different product categories by preventing overfitting to idiosyncrasies of a single train-test split.

Exam trap

The trap here is that candidates often assume increasing data size or model complexity always improves generalization, but the question specifically tests the understanding that cross-validation techniques like stratified k-fold directly address overfitting and domain shift by providing a more reliable estimate of model performance across diverse data splits.

270
Multi-Selectmedium

A data scientist is tuning a random forest model using SageMaker Hyperparameter Tuning. The objective metric is validation:accuracy. Which THREE hyperparameters are most commonly tuned for random forest? (Choose THREE.)

Select 3 answers
A.Learning rate
B.Minimum samples per leaf (min_samples_leaf)
C.Maximum depth (max_depth)
D.Number of trees (n_estimators)
E.Batch size
AnswersB, C, D

This parameter helps prevent overfitting.

Why this answer

Options B, C, and D are correct. Common tunable hyperparameters for random forest include number of trees (n_estimators), maximum depth (max_depth), and minimum samples per leaf (min_samples_leaf). Option A (learning rate) is for gradient boosting.

Option E (batch size) is for neural networks, not random forest.

271
MCQeasy

A data scientist is training a linear regression model on a dataset with 10 features. After training, the model has high variance on the test set. Which technique should the data scientist use to reduce variance without significantly increasing bias?

A.Use L2 regularization
B.Add more features
C.Use a simpler model
D.Use a deeper decision tree
AnswerA

L2 regularization penalizes large coefficients, reducing variance.

Why this answer

L2 regularization (Ridge regression) adds a penalty term proportional to the square of the magnitude of the coefficients, which shrinks them toward zero. This reduces model complexity and variance by preventing any single feature from having an overly large influence, without eliminating features entirely, thus keeping bias relatively low.

Exam trap

AWS often tests the distinction between L1 (Lasso) and L2 (Ridge) regularization, and the trap here is that candidates might think adding more features or using a simpler model is the only way to reduce variance, overlooking that L2 regularization can reduce variance without the drastic bias increase of feature elimination.

How to eliminate wrong answers

Option B is wrong because adding more features increases model complexity, which typically increases variance further, not reduces it. Option C is wrong because using a simpler model (e.g., reducing the number of features or using a less flexible algorithm) would reduce variance but at the cost of a significant increase in bias, violating the requirement to not significantly increase bias. Option D is wrong because a deeper decision tree increases model complexity and variance, which is the opposite of what is needed to address high variance.

272
Multi-Selecthard

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

Select 3 answers
A.Use Pipe mode for large datasets to reduce I/O overhead
B.Use SageMaker Debugger to automatically fix training errors
C.Set up automatic model tuning (hyperparameter optimization)
D.Use SageMaker Debugger to profile GPU utilization
E.Train on a single instance to avoid distributed training overhead
AnswersA, C, D

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

Why this answer

Profiling GPU utilization helps identify bottlenecks. Using Pipe mode for large datasets reduces I/O. Setting up automatic model tuning (hyperparameter optimization) is a best practice.

Training on a single instance is not a best practice for large models. Debugger is for monitoring, not for training acceleration.

273
MCQeasy

A data scientist is trying to run a SageMaker training job that writes output to an S3 bucket 'my-bucket'. The IAM policy is shown. The training job fails with an AccessDenied error when trying to write to S3. What is the reason?

A.The S3 bucket is encrypted with AWS KMS and the policy does not include kms:GenerateDataKey
B.The policy does not allow s3:ListBucket
C.The policy does not allow s3:PutObject
D.The policy does not allow s3:PutObjectAcl
AnswerA

When KMS encryption is used, SageMaker needs kms:GenerateDataKey permission to write.

Why this answer

The training job fails with an AccessDenied error when writing to an S3 bucket that is encrypted with AWS KMS. The IAM policy shown must include the `kms:GenerateDataKey` permission to allow the SageMaker training job to generate a data key for encrypting the output objects. Without this KMS permission, the S3 PutObject operation is denied even if the policy allows `s3:PutObject`, as KMS encryption requires explicit authorization to use the customer master key (CMK).

Exam trap

The trap here is that candidates often focus only on S3 permissions (like `s3:PutObject`) and overlook the need for KMS permissions when the bucket uses SSE-KMS, leading them to incorrectly select Option C or D.

How to eliminate wrong answers

Option B is wrong because `s3:ListBucket` is not required for writing objects to S3; it is needed for listing bucket contents, not for PutObject operations. Option C is wrong because the policy likely includes `s3:PutObject` (as the question implies the policy allows writing), but the AccessDenied error stems from missing KMS permissions, not from a missing PutObject action. Option D is wrong because `s3:PutObjectAcl` is only required when explicitly setting object ACLs during upload, which is not a default behavior for SageMaker training jobs; the error is not related to ACL management.

274
MCQhard

A data scientist is using SageMaker to train a TensorFlow model. The training script uses tf.data.Dataset to load data from S3. Training is slow because of I/O bottleneck. Which change should the data scientist make to improve I/O performance?

A.Enable EBS optimization on the training instance.
B.Use Pipe input mode for the training channel.
C.Use SageMaker local mode for training.
D.Convert the dataset to RecordIO format.
AnswerB

Pipe input mode streams training data directly from S3 to the SageMaker training container without first downloading it to the local Amazon Elastic Block Store (EBS) volume, eliminating the I/O bottleneck caused by `tf.data.Dataset`’s default File input mode, which requires full dataset download before training begins. This satisfies the stem’s requirement to reduce latency from S3 reads during TensorFlow model training.

Why this answer

Pipe input mode streams data directly from S3 into the training algorithm without writing to disk, eliminating the I/O bottleneck caused by downloading entire files. This is particularly effective with tf.data.Dataset, as the pipeline can consume data incrementally, reducing latency and improving throughput for large datasets.

Exam trap

The trap here is that candidates often confuse EBS optimization (which improves local disk performance) with S3 data access optimization, or assume that RecordIO is a universal performance fix, ignoring that TensorFlow's native pipeline benefits more from streaming input modes.

How to eliminate wrong answers

Option A is wrong because EBS optimization improves network throughput for EBS volumes, but the training script loads data from S3, not from an EBS volume; the bottleneck is S3 I/O, not EBS. Option C is wrong because SageMaker local mode runs training on the local instance's file system, which does not address S3 I/O bottlenecks and may even exacerbate them if data must be downloaded first. Option D is wrong because converting to RecordIO format is beneficial for SageMaker's built-in algorithms (e.g., XGBoost) that natively support it, but TensorFlow's tf.data.Dataset works optimally with native formats like TFRecord; RecordIO does not improve S3 streaming performance and adds unnecessary conversion overhead.

275
Multi-Selecteasy

A data scientist is performing hyperparameter optimization for a gradient boosting model using Amazon SageMaker Automatic Model Tuning. The objective metric is 'validation:logloss'. Which TWO strategies can help the tuning job converge faster? (Choose TWO.)

Select 2 answers
A.Use Bayesian optimization strategy
B.Increase the number of tuning jobs
C.Increase the resource limits for each training job
D.Use random search strategy
E.Use early stopping based on the objective metric
AnswersA, E

Bayesian optimization intelligently selects hyperparameters to converge faster.

Why this answer

Bayesian optimization is a hyperparameter tuning strategy that builds a probabilistic model of the objective function and uses it to select the most promising hyperparameter combinations to evaluate next. By focusing on regions of the hyperparameter space that are likely to yield better validation:logloss, it converges to an optimal configuration in fewer training jobs compared to uninformed search methods, thus speeding up the tuning process.

Exam trap

The trap here is that candidates often confuse 'increasing resources' (Option C) with improving convergence speed, but resource limits only affect individual training job speed, not the efficiency of the hyperparameter search itself.

276
Multi-Selectmedium

A data scientist is training a binary classification model on an imbalanced dataset (95% negative class, 5% positive class). The model currently achieves 94% accuracy but a recall of only 0.10 on the positive class. Which TWO strategies should the data scientist consider to improve recall without significantly sacrificing precision? (Choose 2.)

Select 2 answers
A.Undersample the majority class to match the minority class size.
B.Increase the regularization strength to reduce overfitting.
C.Assign higher class weights to the positive class in the loss function.
D.Use a deeper neural network with more layers.
E.Oversample the minority class using SMOTE.
AnswersC, E

Higher weight for positive class penalizes false negatives, improving recall.

Why this answer

Assigning higher class weights to the positive class in the loss function (option C) penalizes misclassifications of the minority class more heavily, forcing the model to focus on positive examples. Oversampling the minority class using SMOTE (option E) generates synthetic positive samples, improving the model's ability to learn decision boundaries for the positive class. Both techniques directly address class imbalance without discarding data.

Option A (undersampling) may remove useful negative samples, harming overall performance. Option B (increasing regularization) reduces overfitting but does not specifically improve recall. Option D (using a deeper network) may increase overfitting and does not target recall directly.

277
MCQeasy

A company wants to build a real-time anomaly detection system for IoT sensor data. The data arrives as a stream of numerical values. The model should adapt to concept drift over time. Which approach is most suitable?

A.Train an online learning model, such as stochastic gradient descent (SGD) with a sliding window
B.Use a static deep learning model trained once on historical data
C.Use a stateful LSTM with fixed weights
D.Batch train a random forest model monthly
AnswerA

Online learning updates the model incrementally, allowing adaptation to concept drift.

Why this answer

Online learning with stochastic gradient descent (SGD) using a sliding window allows the model to continuously update its parameters as new IoT sensor data arrives, adapting to concept drift without retraining from scratch. The sliding window ensures that the model focuses on the most recent data distribution, discarding outdated patterns, which is essential for real-time anomaly detection in streaming environments.

Exam trap

AWS often tests the misconception that stateful recurrent models (like LSTMs) inherently adapt to concept drift, but without weight updates they remain static; the trap here is confusing 'statefulness' (which preserves temporal context across batches) with 'online learning' (which updates model parameters).

How to eliminate wrong answers

Option B is wrong because a static deep learning model trained once on historical data cannot adapt to concept drift; it will become stale as the data distribution changes over time, leading to degraded anomaly detection performance. Option C is wrong because a stateful LSTM with fixed weights does not update its parameters after deployment, so it cannot adapt to evolving patterns in the streaming data, and its statefulness alone does not enable learning from new data. Option D is wrong because batch training a random forest model monthly introduces a significant delay between data arrival and model update, which is unsuitable for real-time anomaly detection and cannot handle gradual or sudden concept drift between retraining intervals.

278
MCQmedium

A company is training a deep learning model on Amazon SageMaker using a large dataset stored in S3. The training job is failing with an error indicating insufficient memory. The model architecture and hyperparameters are fixed. Which change is MOST likely to resolve the issue without modifying the model code?

A.Enable SageMaker's distributed data parallelism.
B.Use managed Spot training to get cheaper compute.
C.Use a larger instance type with more memory.
D.Use Pipe mode for input data instead of File mode.
AnswerA

Distributed data parallelism splits the minibatch across multiple GPUs/instances, reducing per-device memory footprint.

Why this answer

Enable SageMaker's distributed data parallelism. Since the model architecture and hyperparameters are fixed, the insufficient memory error likely arises because the dataset is too large to fit into the memory of a single instance. Distributed data parallelism splits the training data across multiple instances, allowing each instance to process a smaller subset, thereby reducing per-instance memory usage without any code modifications.

Option B (managed Spot training) reduces cost but does not address memory. Option C (using a larger instance) could provide more memory but may be more expensive and does not directly solve the root cause of data size relative to fixed hyperparameters. Option D (Pipe mode) improves data streaming efficiency but does not reduce the memory required for model parameters or intermediate activations.

279
MCQeasy

A data scientist trains a linear regression model to predict house prices. The model has high bias (underfitting). Which action is most likely to reduce bias?

A.Reduce the number of features
B.Decrease the maximum depth of the tree
C.Increase model complexity
D.Add L1 regularization
AnswerC

More complex models can capture underlying patterns better, reducing bias.

Why this answer

Increasing model complexity (e.g., adding polynomial features or using a more flexible algorithm) can reduce bias. Adding L1 regularization increases bias, reducing features reduces complexity, and lowering max_depth for a tree also increases bias.

280
MCQmedium

A data scientist is using Amazon SageMaker built-in XGBoost algorithm to train a regression model. The training job completes successfully but the model performance on the test set is poor, with high bias. Which hyperparameter adjustment is most likely to help reduce bias?

A.Increase the max_depth parameter.
B.Reduce the num_round parameter.
C.Increase the gamma parameter.
D.Decrease the max_depth parameter.
AnswerA

Increasing max_depth allows trees to learn more complex patterns, reducing bias.

Why this answer

High bias (underfitting) can be reduced by increasing the model complexity. Increasing max_depth allows more complex trees. Decreasing max_depth would increase bias.

Increasing gamma increases regularization and bias. Reducing num_round (number of trees) reduces complexity.

281
MCQeasy

A data scientist is training a binary classification model on a highly imbalanced dataset where the positive class represents only 1% of the data. Which metric should be used to evaluate model performance during training to ensure the model is learning to detect the positive class?

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

F1 score balances precision and recall, making it a good single metric for imbalanced binary classification. It captures both false positives and false negatives.

Why this answer

Accuracy is misleading for imbalanced datasets because a model that predicts the majority class all the time can achieve 99% accuracy. F1 score balances precision and recall, making it suitable for imbalanced classification. Precision, recall, and AUC are also useful, but F1 is a common single metric for imbalanced binary classification.

Option A: F1 score correctly balances precision and recall. Option B: Accuracy is not suitable. Option C: Precision alone ignores recall.

Option D: Recall alone ignores precision.

282
MCQmedium

A data scientist is training a binary classification model on a dataset with 100,000 positive samples and 1,000 negative samples. The model achieves 99% accuracy on the test set but a very low F1 score. What is the most likely cause?

A.The test set contains only positive samples
B.The model is overfitting due to too many features
C.The model is underfitting due to insufficient training
D.The model predicts the majority class most of the time due to class imbalance
AnswerD

Class imbalance causes the model to be biased toward the majority class, leading to high accuracy but low F1.

Why this answer

The accuracy is high because the model predicts the majority class (positive) most of the time, but the F1 score is low because it fails to identify the minority class (negative) correctly. This is a classic symptom of class imbalance where the model is biased toward the majority class.

283
MCQhard

A data scientist is training a deep learning model on Amazon SageMaker and notices that training is taking much longer than expected. The training job uses a single GPU instance. The model is a large transformer with millions of parameters. Which change would most likely reduce training time?

A.Reduce the batch size to fit in memory
B.Use a smaller instance type
C.Switch to a CPU instance
D.Use SageMaker's distributed data parallelism with multiple GPU instances
AnswerD

Data parallelism splits the mini-batch across GPUs, reducing training time.

Why this answer

Using data parallelism with multiple GPU instances can significantly reduce training time for large models by distributing the workload across multiple GPUs. Model parallelism is also possible but data parallelism is more common and easier to implement.

284
Multi-Selecthard

A machine learning team is building a multi-class image classifier using a pre-trained ResNet-50 model in Amazon SageMaker. The dataset has 10 classes but is highly imbalanced, with one class representing 80% of the samples. The team wants to improve model performance on the minority classes. Which TWO of the following approaches are most likely to help? (Select TWO.)

Select 2 answers
A.Oversample the minority classes in the training data.
B.Reduce the batch size to increase the frequency of weight updates.
C.Increase the number of layers in the model.
D.Switch to a focal loss function.
E.Use class weighting in the loss function.
AnswersA, E

Oversampling increases representation of minority classes, balancing the training set.

Why this answer

Oversampling the minority classes (Option A) directly addresses class imbalance by replicating samples from underrepresented classes, giving the model more exposure to them during training. This is a standard data-level technique that helps the ResNet-50 model learn discriminative features for minority classes without altering the loss function or model architecture.

Exam trap

The trap here is that candidates may incorrectly select focal loss (Option D) as a standalone answer, but the question requires exactly two correct options, and class weighting (Option E) is a more straightforward loss-modification technique that is explicitly tested in the MLS-C01 exam as a standard approach for imbalanced classification.

285
MCQeasy

A startup is building a recommendation system for an e-commerce platform using collaborative filtering. They have a dataset of user-item interactions (ratings) with 1 million users and 100,000 items. The data is sparse (99% missing ratings). They need to train a model on Amazon SageMaker that can handle large-scale sparse data efficiently. Which approach should they use?

A.Use PCA to reduce dimensionality and then apply k-nearest neighbors
B.Use the built-in Factorization Machines algorithm in SageMaker
C.Use the built-in XGBoost algorithm with one-hot encoding for user and item IDs
D.Implement a neural network with dense layers using the built-in MXNet framework
AnswerB

Factorization Machines are designed for sparse data and scale well.

Why this answer

SageMaker's Factorization Machines handle sparse data efficiently and are designed for recommendation tasks.

286
MCQmedium

A data scientist is training a binary classifier to predict customer churn. The dataset has 10,000 samples, with 500 churners (positive class). The scientist trains a logistic regression model and obtains an F1-score of 0.6. To improve the F1-score, which approach is MOST likely to be effective?

A.Increase the regularization strength (C)
B.Apply PCA to reduce feature dimensionality
C.Apply SMOTE to oversample the minority class
D.Use the original dataset without any modification
AnswerC

SMOTE generates synthetic samples for the minority class, balancing the dataset and often improving F1-score.

Why this answer

The dataset is highly imbalanced (500 churners out of 10,000 samples, a 5% positive rate). Logistic regression trained on such imbalance tends to bias toward the majority class, resulting in low recall for the minority class and a poor F1-score. SMOTE (Synthetic Minority Oversampling Technique) generates synthetic samples for the minority class by interpolating between existing minority instances, which balances the class distribution and allows the model to learn a better decision boundary, directly improving recall and F1-score.

Exam trap

The MLS-C01 exam often tests the misconception that regularization (Option A) or dimensionality reduction (Option B) can fix class imbalance, when in fact they address overfitting and noise, not skewed class priors.

How to eliminate wrong answers

Option A is wrong because increasing regularization strength (C) reduces model complexity and can lead to underfitting, which typically worsens performance on imbalanced data by pushing the decision boundary further toward the majority class. Option B is wrong because PCA reduces dimensionality by projecting data onto principal components that maximize variance, but it does not address class imbalance; it may even discard discriminative information for the minority class. Option D is wrong because using the original dataset without modification ignores the severe class imbalance, and the logistic regression model will continue to predict the majority class for most samples, yielding a low F1-score.

287
MCQeasy

A company wants to use Amazon SageMaker to automatically tune hyperparameters for a XGBoost model. Which built-in SageMaker feature should be used?

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

This is the service for hyperparameter tuning.

Why this answer

SageMaker Automatic Model Tuning performs hyperparameter optimization. Option A (SageMaker Debugger) monitors training. Option B (SageMaker Model Monitor) detects drift.

Option C (SageMaker Experiments) tracks trials. Option D (SageMaker Automatic Model Tuning) correctly performs hyperparameter tuning.

288
MCQmedium

A data scientist is working on a regression problem to predict house prices. The dataset has 80 features, including categorical variables with high cardinality (e.g., zip code with 10,000 unique values). The target variable is log-transformed. The data scientist trains a linear regression model and obtains an R² of 0.45 on the test set. To improve performance, the data scientist considers: A) Applying one-hot encoding to all categorical features and using Ridge regression. B) Using target encoding for high-cardinality features and using a tree-based model like XGBoost. C) Removing all categorical features and using polynomial features for numerical features. D) Using principal component analysis (PCA) on all features before training a linear model. Which approach is MOST likely to improve the model's performance?

A.Remove categorical features and use polynomial features
B.Target encoding + XGBoost
C.One-hot encoding + Ridge regression
D.PCA on all features before linear regression
AnswerB

Target encoding reduces dimensionality and XGBoost captures complex patterns.

Why this answer

Target encoding efficiently handles high-cardinality features, and tree-based models like XGBoost can capture non-linear relationships and interactions, likely improving R². One-hot encoding would create too many features, causing sparsity. Removing categories loses information.

PCA may discard important information.

289
Multi-Selecteasy

A data scientist is evaluating a binary classification model. The model's AUC-ROC is 0.95. Which TWO statements are true?

Select 2 answers
A.The model has no false positives
B.The model has excellent discriminative ability
C.The model's performance is independent of the decision threshold
D.The model is well-calibrated
E.The model's accuracy is at least 95%
AnswersB, C

AUC close to 1 indicates strong separation between classes.

Why this answer

AUC-ROC measures the model's ability to distinguish between classes across all thresholds. A high AUC (close to 1) indicates good performance. AUC-ROC is threshold-independent.

It does not directly indicate accuracy or calibration.

290
Multi-Selectmedium

A data scientist is training a linear regression model on a dataset with 10 numerical features. After training, the model's R-squared value is 0.99 on the training set but only 0.60 on the test set. Which TWO of the following are appropriate actions to reduce overfitting? (Choose TWO.)

Select 2 answers
A.Normalize the features
B.Add more features to the model
C.Use a subset of the most important features
D.Increase the number of training epochs
E.Apply L2 regularization (Ridge regression)
AnswersC, E

Reducing the number of features reduces model complexity and overfitting.

Why this answer

Regularization (L1 or L2) penalizes large coefficients and reduces overfitting. Reducing model complexity by using fewer features or simplifying the model also helps. Adding more features would increase complexity and overfitting.

Increasing the number of epochs is not relevant for linear regression (which has a closed-form solution).

291
Multi-Selecteasy

Which TWO actions are valid ways to handle missing data in a dataset before training a machine learning model? (Select TWO.)

Select 2 answers
A.Delete rows with missing values
B.Remove all features that have any missing values
C.Replace missing values with the maximum value
D.Ignore missing values and train the model
E.Impute missing values with the mean
AnswersA, E

Row deletion is valid if missingness is random.

Why this answer

Deleting rows with missing values (listwise deletion) is a straightforward and valid approach when the missing data is random and the dataset is large enough that the loss of rows does not significantly reduce statistical power or introduce bias. This method avoids the need to estimate missing values and is commonly used in practice when the proportion of missing data is low.

Exam trap

The MLS-C01 exam often tests the misconception that 'ignoring missing values' is acceptable because some algorithms like tree-based models can technically handle missing values internally, but the exam expects explicit data preprocessing steps as part of the modeling pipeline.

292
MCQmedium

A company uses Amazon SageMaker to train a time-series forecasting model using the built-in DeepAR algorithm. The training data consists of daily sales for 1000 products over 2 years. The model performs well on most products, but for a few products with intermittent demand (sporadic sales), the predictions are poor. Which action should the data scientist take to improve predictions for these products?

A.Create a separate forecasting model specifically for intermittent demand products, using a model designed for such patterns (e.g., Croston's method).
B.Use a linear regression model for all products.
C.Increase the context length of the DeepAR model to capture longer history.
D.Add more training data by including additional product categories.
AnswerA

Intermittent demand requires specialized models like Croston's method or TSB.

Why this answer

Intermittent demand patterns (sporadic sales) require specialized models like Croston's method, which are designed to handle non-continuous demand. Option B is wrong because a simple linear regression model cannot capture the irregular spikes of intermittent demand; such models assume continuous, steady patterns. Option C is wrong because increasing the context length of DeepAR, which is built for regular time series, does not address the fundamental issue of sporadic demand—the model still expects continuous values.

Option D is wrong because adding unrelated product categories introduces noise and does not help the model learn the specific intermittent pattern of the target products.

293
Multi-Selectmedium

Which TWO approaches are valid for handling missing categorical values in a dataset before training a machine learning model?

Select 2 answers
A.Remove all rows with missing values
B.Impute missing values with the mode of the column
C.Impute missing values with the median of the column
D.Impute missing values with the mean of the column
E.Treat missing values as a separate category
AnswersB, E

Mode is appropriate for categorical data.

Why this answer

The mode (most frequent value) is the only valid measure of central tendency for categorical data, as it identifies the most common category. Imputing with the mode preserves the distribution of categories and is a standard technique for handling missing categorical values in preprocessing pipelines like scikit-learn's SimpleImputer with strategy='most_frequent'.

Exam trap

AWS often tests the distinction between numerical and categorical imputation methods, trapping candidates who apply mean or median imputation to categorical features without recognizing that these statistics are invalid for non-numeric data.

294
MCQmedium

A company uses Amazon SageMaker to train a model. The training job runs successfully but the model artifacts are not saved to the specified S3 output path. What is a likely cause?

A.The training script does not save the model to /opt/ml/model.
B.The model size exceeds the S3 bucket limit.
C.The training job used spot instances.
D.The S3 bucket is in a different AWS Region.
AnswerA

SageMaker uploads contents of /opt/ml/model to S3; saving elsewhere means artifacts are lost.

Why this answer

Amazon SageMaker expects the training script to save the model artifacts to the `/opt/ml/model` directory. After the training job completes, SageMaker automatically copies the contents of this directory to the specified S3 output path. If the script saves the model elsewhere (e.g., `/tmp` or a custom path), no artifacts will be uploaded, resulting in an empty or missing S3 output.

Exam trap

The trap here is that candidates assume any successful training job automatically saves artifacts, but SageMaker only uploads what is explicitly placed in `/opt/ml/model`, and the exam tests this specific SageMaker convention.

How to eliminate wrong answers

Option B is wrong because S3 bucket limits are based on total bucket size (unlimited) and object size (up to 5 TB per object), not model size; a model exceeding these limits would cause a different error (e.g., upload failure), not a silent missing artifact. Option C is wrong because using spot instances does not affect where the model is saved; spot instances can be preempted, but if the training completes successfully, artifacts are still saved to `/opt/ml/model` and uploaded. Option D is wrong because SageMaker can write to S3 buckets in any region as long as the bucket policy and IAM role grant cross-region access; a region mismatch would cause a permission or access error, not a silent failure to save artifacts.

295
MCQmedium

A company uses SageMaker to train a time-series forecasting model using Amazon Forecast. The dataset contains historical sales data for 10,000 products over 2 years. Which data format is required for the target time series?

A.A single JSON file with nested arrays
B.A CSV file with columns: timestamp, target_value, item_id
C.A text file with one value per line
D.A Parquet file partitioned by date
AnswerB

This is the required format for target time series in Forecast.

Why this answer

Amazon Forecast requires the target time series data to be in a CSV format with specific columns: timestamp, target_value, and item_id. This structured format allows the service to correctly identify the time series for each product and the target metric to forecast. The CSV format is the standard input for Forecast's built-in algorithms and ensures compatibility with the dataset import process.

Exam trap

The trap here is that candidates may assume Amazon Forecast supports flexible data formats like JSON or Parquet for all dataset types, but the target time series is strictly restricted to CSV to ensure consistent parsing and algorithm compatibility.

How to eliminate wrong answers

Option A is wrong because Amazon Forecast does not accept JSON files for target time series data; it requires CSV format for dataset import. Option C is wrong because a text file with one value per line lacks the necessary metadata (timestamp and item_id) to define multiple time series and their temporal alignment. Option D is wrong while Parquet is a supported format for related time series (RTS) or item metadata, the target time series dataset must be in CSV format as per Forecast's documentation.

296
Multi-Selecteasy

A data scientist is evaluating a binary classification model that predicts whether a customer will churn. The model achieves an AUC of 0.85 on the test set. Which TWO statements about AUC are correct? (Choose two.)

Select 2 answers
A.AUC represents the probability that a randomly chosen positive instance is ranked higher than a randomly chosen negative instance.
B.An AUC of 0.85 indicates the model is no better than random guessing.
C.AUC is the average precision across all thresholds.
D.AUC is equivalent to the accuracy of the model at the default threshold of 0.5.
E.AUC is threshold-independent, meaning it evaluates the model's ranking performance across all thresholds.
AnswersA, E

This is the statistical interpretation of AUC.

Why this answer

AUC measures the probability that a randomly chosen positive instance is ranked higher than a randomly chosen negative instance, which is correctly stated in option A. AUC is also threshold-independent, evaluating model ranking across all thresholds, as stated in option E. Option B is incorrect because an AUC of 0.85 is better than random (0.5).

Option C is incorrect because AUC is not average precision; average precision is a different metric. Option D is incorrect because AUC is not equivalent to accuracy at any specific threshold.

297
MCQeasy

A data scientist is training a linear regression model using Amazon SageMaker's built-in Linear Learner algorithm. The dataset has 500 features and 1 million rows. After training, the model's training RMSE is 2.5 and validation RMSE is 2.6, which is acceptable. However, the scientist notices that many feature coefficients are very small but non-zero, and the model takes a long time to train. The scientist wants to reduce training time while maintaining similar accuracy. Which action should the scientist take?

A.Increase the mini-batch size
B.Increase the L1 regularization strength
C.Switch to a neural network model
D.Increase the L2 regularization strength
AnswerB

Increasing L1 regularization drives many coefficients to zero, reducing the effective number of features and speeding up training, while maintaining similar accuracy.

Why this answer

(increase L1 regularization) will drive many coefficients to zero, reducing effective features and thus training time. Option A (increase mini-batch size) may speed training but could affect convergence. Option C (switch to a neural network model) is unnecessary for this task.

Option D (increase L2 regularization) shrinks coefficients but doesn't zero them out, so less impact on training speed.

298
MCQhard

A data scientist is using Amazon SageMaker to train a deep learning model for image classification. The training job is using a single GPU instance and is taking too long. The scientist wants to reduce training time without sacrificing model accuracy. The dataset contains 100,000 images of size 256x256. Which change would most effectively reduce training time?

A.Reduce the batch size
B.Use a smaller image size (e.g., 128x128)
C.Increase the learning rate
D.Switch to a distributed training setup with multiple GPUs
AnswerB

Fewer pixels mean faster forward/backward passes, significantly reducing training time.

Why this answer

Reducing image resolution (e.g., to 128x128) significantly reduces the number of pixels and thus the computational cost per epoch, often with minimal impact on accuracy for many tasks. Using a smaller batch size increases the number of iterations but can actually slow down training. Distributed training with multiple GPUs would reduce time but the question asks for a change that does not sacrifice accuracy; distributed training can sometimes affect convergence but is generally safe.

However, reducing resolution is a direct and effective method.

299
MCQeasy

A data scientist is training a binary classification model on a highly imbalanced dataset where the positive class represents only 1% of the data. The model achieves 99% accuracy but only identifies 5% of the actual positives. Which metric should the data scientist use to evaluate model performance?

A.Mean squared error
B.Accuracy
C.Recall
D.Precision
AnswerC

Recall measures the proportion of actual positives correctly identified.

Why this answer

Recall (sensitivity) measures the proportion of actual positives correctly identified by the model. With only 5% of positives detected, recall is 0.05, which directly reveals the model's failure to capture the minority class despite high accuracy. In imbalanced datasets, accuracy is misleading because the model can achieve 99% accuracy by simply predicting the majority class (negative) for all instances.

Exam trap

The MLS-C01 exam often tests the trap that high accuracy implies good performance on imbalanced datasets, leading candidates to choose accuracy without considering class distribution or the specific failure mode (low recall).

How to eliminate wrong answers

Option A is wrong because mean squared error (MSE) is a regression metric that measures average squared differences between predicted and actual values, not suitable for binary classification evaluation. Option B is wrong because accuracy is misleading in imbalanced datasets; a model predicting all negatives achieves 99% accuracy but fails to identify positives, as seen here. Option D is wrong because precision measures the proportion of positive predictions that are correct, which could be high if the model makes very few positive predictions, but it does not capture the low detection rate of actual positives (recall).

300
Multi-Selecthard

A company uses Amazon SageMaker to build a text classification model using a pre-trained BERT model. The dataset contains 10,000 labeled documents. The model is overfitting: training accuracy is 99%, validation accuracy is 85%. Which TWO of the following are most likely to help reduce overfitting? (Choose TWO.)

Select 2 answers
A.Add more transformer layers to the model
B.Increase the dropout rate during fine-tuning
C.Increase the batch size
D.Use a larger pre-trained BERT model
E.Decrease the learning rate
AnswersB, E

Dropout is a regularization technique that randomly drops units, reducing overfitting.

Why this answer

Increasing dropout during fine-tuning adds regularization. Decreasing the learning rate can help the model converge to a better solution and prevent overfitting to the training set. Increasing batch size can sometimes regularize but is not as effective as dropout.

Adding more layers increases model capacity and overfitting. Using a larger pre-trained model also increases capacity.

← PreviousPage 4 of 9 · 603 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Modeling questions.