Courseiva

AWS Certified Machine Learning Specialty MLS-C01 (MLS-C01) — Questions 10511125

1672 questions total · 23pages · All types, answers revealed

Page 14

Page 15 of 23

Page 16
1051
MCQeasy

A data scientist is performing EDA on a dataset that contains customer demographics and purchase history. The dataset has a column 'age' with some values that are negative or unreasonably high (e.g., 200). The scientist wants to identify and handle these outliers. The scientist is using a SageMaker notebook with pandas. Which approach should the scientist take to effectively handle these outliers?

A.Apply standard scaling to the 'age' column
B.Impute the outlier values with the mean of the column
C.Define reasonable bounds based on domain knowledge and filter or cap the outliers
D.Remove the 'age' column entirely
AnswerC

Domain knowledge provides logical bounds to handle outliers appropriately.

Why this answer

The most appropriate approach is to define reasonable bounds based on domain knowledge (e.g., 0-120) and filter out or cap the outliers. Option A is incorrect because standard scaling does not handle outliers; it will still be influenced by extreme values. Option B is incorrect because imputing with the mean can distort the distribution when outliers are present.

Option D is incorrect because removing the entire column discards valuable information.

1052
MCQhard

A company runs a critical ETL job using AWS Glue that writes to an Amazon Redshift cluster. The job occasionally fails due to insufficient disk space on the Redshift cluster. How can the company automate the process to prevent this failure?

A.Use a CloudWatch alarm to trigger a Lambda function that resizes the cluster.
B.Use RA3 node types with managed storage.
C.Increase the number of slices in the Redshift cluster.
D.Reserve additional nodes for the Redshift cluster.
AnswerA

This automates scaling based on disk usage.

Why this answer

Using Amazon CloudWatch to monitor disk space and automatically resize the cluster is the best automated solution. Reserving nodes does not address space. Using RA3 nodes with managed storage is a good proactive step but does not automate resizing.

The correct answer is to monitor and auto-resize.

1053
MCQeasy

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

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

Regularization penalizes large coefficients and reduces overfitting.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1054
MCQmedium

An IAM policy is attached to a data engineering role that writes to an S3 bucket. The policy is shown in the exhibit. What is the effect of this policy?

A.The role can write objects with any encryption, but reading is restricted to SSE-KMS only
B.The role can read and write any object without encryption restrictions
C.The role can only read objects; writing is always denied
D.The role must use SSE-KMS when writing objects; reading is allowed only if the object is encrypted with SSE-KMS
AnswerD

The Allow statement grants GetObject only when SSE-KMS is specified, and the Deny statement enforces SSE-KMS for PutObject.

Why this answer

The IAM policy uses a `Condition` block with `s3:x-amz-server-side-encryption` set to `aws:kms`, which enforces that any `PutObject` request must include SSE-KMS encryption. The `Deny` effect on `s3:GetObject` when encryption is not `aws:kms` ensures that reading objects without SSE-KMS is blocked. This combination allows writing only with SSE-KMS and reading only of objects encrypted with SSE-KMS, making option D correct.

Exam trap

The trap here is that candidates often overlook the `Deny` effect on `s3:GetObject` and assume the policy only restricts writes, missing that reading is also conditionally denied unless the object uses SSE-KMS.

How to eliminate wrong answers

Option A is wrong because the policy does not allow writing objects with any encryption; it explicitly denies PutObject if SSE-KMS is not used. Option B is wrong because the policy restricts both reading and writing based on encryption type, so unrestricted read/write is not permitted. Option C is wrong because the policy allows writing objects as long as SSE-KMS is used, and reading is allowed for SSE-KMS encrypted objects, so it is not a blanket denial of writes.

1055
MCQhard

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

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

Increases complexity, reducing bias.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1056
MCQmedium

A data scientist is analyzing application logs in JSON format. Based on the exhibit, which EDA insight is most valuable for troubleshooting?

A.There is a recurring NullPointerException error.
B.All logs occurred at the same timestamp.
C.There is a connection timeout issue.
D.Most logs are at WARN level.
AnswerA

Three out of four logs are the same error, indicating a pattern.

Why this answer

The repeated NullPointerException error appears multiple times in the logs, indicating a recurring issue that is most valuable for troubleshooting. Option B is incorrect because the logs show different timestamps, not all the same. Option C is incorrect because connection timeout appears only once, while the NullPointerException is more frequent.

Option D is incorrect because the log levels vary, and the majority of logs are not at WARN level.

1057
MCQhard

During EDA, a data scientist plots the distribution of a numeric feature and observes that it is right-skewed. The feature will be used as input to a linear model. Which transformation should the data scientist apply?

A.Square transformation
B.Log transformation
C.One-hot encoding
D.Standardization (Z-score)
AnswerB

Log transformation compresses the tail and reduces right skewness.

Why this answer

A right-skewed distribution indicates that the feature has a long tail on the right, which can violate the linear model assumption of normally distributed errors. The log transformation compresses the high values and expands the low values, making the distribution more symmetric and stabilizing variance, which improves linear model performance.

Exam trap

The MLS-C01 exam often tests the misconception that standardization or scaling fixes skewness, but candidates must remember that only shape-altering transformations like log or Box-Cox address non-normality, not just rescaling.

How to eliminate wrong answers

Option A is wrong because a square transformation amplifies skewness by increasing the spread of high values, making the distribution even more right-skewed. Option C is wrong because one-hot encoding is used for categorical features, not for transforming the distribution of numeric features. Option D is wrong because standardization (Z-score) centers and scales the data but does not change the shape of the distribution, so it does not address skewness.

1058
Multi-Selectmedium

A data scientist is performing EDA on a dataset with mixed data types (numerical and categorical). Which TWO visualizations are most appropriate for understanding the distribution of categorical features?

Select 2 answers
A.Histogram
B.Box plot
C.Pie chart
D.Scatter plot
E.Bar chart
AnswersC, E

Pie charts show proportions of categories.

Why this answer

Bar charts and pie charts are both effective for visualizing the distribution of categorical features. Bar charts display the count or frequency of each category, while pie charts show the relative proportions. Options A (histogram) and B (box plot) are designed for numerical data, and option D (scatter plot) is for the relationship between two numerical variables.

1059
MCQeasy

A data analyst is exploring a dataset and notices that the target variable has a Poisson distribution. Which type of model is most appropriate for this target?

A.Poisson regression
B.Linear regression
C.Cox proportional hazards model
D.Logistic regression
AnswerA

Poisson regression models count data with Poisson distribution.

Why this answer

Poisson regression is the correct choice because it is specifically designed for modeling count data where the target variable follows a Poisson distribution, which is characterized by non-negative integer values and a variance equal to the mean. This aligns directly with the data analyst's observation of a Poisson-distributed target, making Poisson regression the most appropriate generalized linear model (GLM) for this scenario.

Exam trap

The trap here is that candidates may confuse Poisson regression with logistic regression or linear regression, mistakenly applying a model for binary outcomes or continuous data to count data, without recognizing that the Poisson distribution's unique properties require a specialized GLM.

How to eliminate wrong answers

Option B is wrong because linear regression assumes a normally distributed target variable with constant variance, which is violated when the target follows a Poisson distribution (count data with variance equal to the mean). Option C is wrong because Cox proportional hazards model is a survival analysis technique for time-to-event data with censoring, not for modeling a Poisson-distributed count target. Option D is wrong because logistic regression models binary or ordinal outcomes using a logit link function, not count data with a Poisson distribution.

1060
MCQeasy

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

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

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

Why this answer

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

1061
MCQhard

Refer to the exhibit. A company is using the Kinesis stream 'my-stream' with one shard. The producer is sending 1000 records per second, each 1 KB. The consumer is reading from the stream using the Kinesis Client Library (KCL). The consumer is able to process 500 records per second per shard. What is the most likely cause of the consumer falling behind?

A.The retention period is set to 24 hours, which is too short.
B.The stream uses KMS encryption, which adds latency.
C.The stream has only one shard, which limits the read throughput to 1 MB/s.
D.The consumer application is not using enhanced fan-out.
AnswerB

KMS encryption adds latency for both producer and consumer. Since the consumer is processing at half the producer rate, decryption overhead is a likely contributor to the consumer falling behind.

Why this answer

The consumer is processing 500 records per second per shard, which is half the producer's rate of 1000 records per second. While the shard's read throughput limit is 2 MB/s, not 1 MB/s, the consumer's processing speed is the bottleneck. Among the options, KMS encryption is the most plausible cause because decryption latency can significantly slow down the consumer, especially if the consumer application is not optimized for encryption overhead.

Exam trap

Candidates often mistake the shard's read throughput limit as 1 MB/s (the write limit) rather than the actual 2 MB/s. In this scenario, the shard is not the bottleneck; the consumer's processing rate is lower due to factors like KMS encryption latency.

How to eliminate wrong answers

Option A is wrong because the retention period (default 24 hours, max 365 days) controls how long records are stored in the stream, not the rate at which data can be consumed; a short retention period does not cause the consumer to fall behind—it only causes data to expire sooner. Option B is wrong because KMS encryption adds latency only during key retrieval and decryption, but the consumer's processing rate of 500 records per second is a software limitation, not a network or encryption overhead issue; KMS encryption does not reduce the shard's throughput. Option D is wrong because enhanced fan-out is a feature that provides dedicated read throughput of 2 MB/s per consumer per shard, but the consumer is already processing only 500 records per second (0.5 MB/s), which is well below the standard shard read limit of 2 MB/s; enhanced fan-out would not help if the consumer's processing logic is the bottleneck.

1062
MCQhard

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

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

Bayesian optimization is more efficient.

Why this answer

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

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

1063
MCQmedium

A company uses Amazon DynamoDB as the primary data store for a real-time recommendation engine. The data engineering team needs to export a daily snapshot of the DynamoDB table to S3 for offline analytics. The table is large (10 TB) and has a high read/write throughput. Which method will export the data with the least impact on the production workload?

A.Use AWS Data Pipeline to export the DynamoDB table to S3.
B.Use DynamoDB Scan API with parallel scans to export data to S3.
C.Use the DynamoDB export to S3 feature available in the AWS Console or CLI.
D.Use AWS Glue ETL job with a DynamoDB connection to export data.
AnswerC

This feature exports data without consuming read capacity units, minimizing impact.

Why this answer

The native DynamoDB export to S3 feature uses the table's internal backup mechanism (point-in-time recovery) to export data without consuming any read capacity units (RCUs) from the production table. This ensures zero impact on the live workload, even for a 10 TB table with high throughput.

Exam trap

The trap here is that candidates assume any data extraction from DynamoDB must use the Scan API (options A, B, D) and overlook the native export feature that bypasses the live table entirely, which is the only zero-impact method for large, high-throughput tables.

How to eliminate wrong answers

Option A is wrong because AWS Data Pipeline uses the DynamoDB Scan API under the hood, which consumes RCUs and can throttle production reads on a high-throughput table. Option B is wrong because the DynamoDB Scan API, even with parallel scans, consumes RCUs and can degrade performance for a large table with high read/write throughput. Option D is wrong because AWS Glue ETL jobs with a DynamoDB connection also use the Scan API, consuming RCUs and potentially causing throttling or increased latency for the production workload.

1064
MCQeasy

A data pipeline uses AWS Glue to crawl an S3 bucket and create a table in the AWS Glue Data Catalog. The data is in Parquet format with partitions by date. After a new partition is added to S3, the crawler runs but the new partition is not reflected in the table. What is the most likely cause?

A.The crawler requires an AWS Lambda trigger to be configured for new partitions.
B.The Parquet schema in the new partition does not match the existing table schema.
C.The new partition folder does not follow the Hive-style partition naming convention expected by the crawler.
D.The S3 bucket has too many partitions, exceeding the Glue crawler limit.
AnswerC

Glue crawlers require partition folders to follow the key=value pattern to automatically detect partitions.

Why this answer

The most likely cause is that the new partition folder does not follow the Hive-style partition naming convention expected by the crawler. AWS Glue crawlers expect partition directories to be named in the format key=value (e.g., date=2023-01-01). If the partitions are named differently, the crawler will not recognize them as partitions.

Option A is incorrect because Glue crawlers do not require Lambda triggers. Option B is incorrect because schema mismatch would cause a different error, not just missing partitions. Option D is incorrect because while there is a limit on partitions, it is high enough that 'too many partitions' is less likely than a naming issue.

1065
Multi-Selectmedium

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

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

XGBoost has built-in support for missing values.

Why this answer

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

Exam trap

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

1066
MCQeasy

A company wants to use Amazon SageMaker to train a model on a dataset stored in Amazon S3. The dataset is 100 GB and consists of millions of small JSON files. What should the data engineering team do to optimize training performance?

A.Combine the small JSON files into larger Parquet files using a Spark job on Amazon EMR.
B.Copy the data to an Amazon EBS volume attached to the training instance.
C.Use Amazon Athena to convert the data into a single CSV file.
D.Use S3 Select to filter data before training.
AnswerA

Parquet with larger files improves read efficiency and reduces overhead.

Why this answer

Combining millions of small JSON files into larger Parquet files using a Spark job on Amazon EMR is correct because it reduces the overhead of S3 LIST and GET requests during training. Parquet's columnar format also improves compression and allows SageMaker to read only the necessary columns, significantly accelerating I/O-bound training workloads.

Exam trap

The trap here is that candidates assume S3 Select or Athena can magically optimize small-file performance, but they fail to realize that the core issue is the sheer number of S3 API requests, which only consolidation into larger files can solve.

How to eliminate wrong answers

Option B is wrong because copying 100 GB of small files to an EBS volume attached to the training instance does not address the fundamental problem of millions of small files; it merely moves the I/O bottleneck from S3 to EBS, and EBS volumes have limited throughput and size constraints that can throttle training. Option C is wrong because using Amazon Athena to convert the data into a single CSV file would create a massive single file that SageMaker must read sequentially, eliminating parallelism and causing severe I/O bottlenecks; CSV also lacks the compression and columnar efficiency of Parquet. Option D is wrong because S3 Select only filters data server-side but does not consolidate the millions of small files; the training job still must issue a separate request for each file, overwhelming the S3 API rate limits and causing significant latency.

1067
MCQmedium

A company is building a data lake on Amazon S3. They need to enforce encryption at rest for all objects. Which combination of actions will achieve this? (Assume the bucket is versioned.)

A.Use AWS KMS with automatic key rotation
B.Enable S3 default encryption and set a bucket policy to deny PutObject without encryption headers
C.Enable S3 default encryption only
D.Enable S3 Block Public Access
AnswerB

This ensures all objects are encrypted.

Why this answer

Combining S3 default encryption with a bucket policy that denies PutObject requests lacking encryption headers ensures that every object stored in the bucket is encrypted at rest, even if the PutObject call does not include encryption parameters. Default encryption alone can be overridden by a client that explicitly sets encryption headers, but the bucket policy enforces encryption for all uploads, closing that loophole. This dual approach guarantees compliance with encryption-at-rest requirements for a versioned bucket.

Exam trap

The trap here is that candidates assume S3 default encryption alone is sufficient, but the exam tests the nuance that default encryption can be overridden by client-supplied headers, requiring a bucket policy to enforce encryption for all PutObject requests.

How to eliminate wrong answers

Option A is wrong because using AWS KMS with automatic key rotation only manages the encryption key lifecycle but does not enforce that every object is encrypted at rest; it is a key management feature, not an enforcement mechanism. Option C is wrong because enabling S3 default encryption only applies encryption to objects that are uploaded without encryption headers, but clients can still upload unencrypted objects by explicitly providing a `x-amz-server-side-encryption` header set to `AES256` or `aws:kms`, bypassing the default. Option D is wrong because S3 Block Public Access is a security control that prevents public access to buckets and objects, but it has no effect on encryption at rest; it addresses network access control, not data protection at rest.

1068
MCQmedium

A data scientist runs the above AWS CLI command and gets the output. The object size is 1 GB. They try to open the CSV file in Amazon Athena but get an error. What is the most likely cause?

A.The file format is not supported by Athena
B.The file exceeds the maximum CSV file size that Athena can query without partitioning
C.The file is not compressed with gzip
D.The file is too large for Athena to query at all
AnswerB

Athena has a 100 MB limit for CSV files when not partitioned.

Why this answer

Amazon Athena has a default limit of 100 MB per CSV file when querying without partitioning. A 1 GB file exceeds this limit, causing an error. Option A is wrong because CSV is a supported file format in Athena.

Option C is wrong while gzip compression is supported, it is not required; the issue is file size, not compression. Option D is wrong because Athena can query large files, but only if they are properly partitioned or if the file size is within the per-file limit.

Exam trap

Athena's 100 MB per-file limit for CSV queries without partitioning is often overlooked; candidates may assume the file is too large overall, but partitioning allows much larger datasets.

1069
MCQmedium

A data scientist is performing exploratory data analysis on a dataset containing customer transactions. The dataset has a column 'transaction_date' with timestamps in string format. Which AWS service can be used to parse the timestamps and extract features like day of week and hour?

A.Amazon Athena
B.Amazon SageMaker Studio
C.AWS Glue
D.AWS Data Pipeline
AnswerC

AWS Glue provides built-in transformations for timestamp parsing and feature extraction.

Why this answer

AWS Glue provides built-in transformations to parse timestamps and extract date/time features. Option A is wrong because Amazon Athena is a query service, not a transformation service. Option B is wrong because Amazon SageMaker Studio is an IDE, not a data transformation service.

Option D is wrong because AWS Data Pipeline is a workflow orchestration service, not a timestamp parsing tool.

1070
Multi-Selecteasy

A data analyst is performing exploratory data analysis on a dataset and notices that there are outliers in several numerical columns. Which TWO methods can the analyst use to identify outliers?

Select 2 answers
A.Create a scatter plot matrix to visually inspect.
B.Calculate z-scores and flag any data points with |z| > 3.
C.Use a box plot to visualize the interquartile range (IQR) and identify points outside the whiskers.
D.Compare the mean and median of each column.
E.Plot a histogram and look for gaps.
AnswersB, C

Calculating z-scores and flagging points with |z| > 3 is a standard statistical method for outlier detection, assuming the data is roughly normally distributed.

Why this answer

Options B and C are correct. Box plots use the IQR to identify outliers as points outside 1.5*IQR from the quartiles (option C). Z-scores identify outliers as points with |z| > 3, assuming a roughly normal distribution (option B).

Option A (scatter plot matrix) can help visualize outliers but is not a systematic detection method. Option D (comparing mean and median) provides insight into skewness but does not directly flag outliers. Option E (histogram) shows distribution shape but requires subjective judgment to identify outliers.

1071
MCQhard

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

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

L2 regularization shrinks coefficients and reduces variance.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1072
Drag & Dropmedium

Drag and drop the steps to create a data processing job using Amazon SageMaker Processing in the correct order.

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

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

Why this order

Processing requires script creation, data upload, job configuration, execution, and verification.

1073
MCQmedium

A company uses Amazon DynamoDB as the primary data store for a real-time application. The data science team wants to analyze the data using Amazon Athena. What is the most efficient way to make the DynamoDB data available for Athena queries?

A.Use AWS Glue to extract data from DynamoDB and load into S3 on a schedule.
B.Use Amazon Redshift Spectrum to query DynamoDB directly.
C.Use DynamoDB Streams to invoke an AWS Lambda function that writes data to Amazon S3 in Parquet format. Then query the data in S3 using Athena.
D.Use Amazon EMR to read directly from DynamoDB and run Hive queries.
AnswerC

This provides a decoupled, cost-effective solution for analytics.

Why this answer

DynamoDB Streams captures real-time changes, and an AWS Lambda function can efficiently write these changes to Amazon S3 in Parquet format, which is optimized for columnar storage and Athena queries. This approach minimizes the overhead of scheduled batch jobs and provides near-real-time data availability for analytics.

Exam trap

The trap here is that candidates may assume scheduled batch extraction (Option A) is sufficient for real-time analysis, overlooking the efficiency of streaming-based incremental updates that avoid full table scans and reduce costs.

How to eliminate wrong answers

Option A is wrong because using AWS Glue to extract data from DynamoDB and load into S3 on a schedule introduces latency and is less efficient for real-time analysis compared to streaming-based approaches. Option B is wrong because Amazon Redshift Spectrum cannot query DynamoDB directly; it only supports querying data in Amazon S3 or other data sources via external tables, not DynamoDB. Option D is wrong because Amazon EMR reading directly from DynamoDB and running Hive queries is inefficient for Athena-based analysis, as it requires managing a separate cluster and does not directly make data available in S3 for Athena.

1074
Multi-Selecthard

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

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

Dropout regularizes by randomly dropping neurons.

Why this answer

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

Exam trap

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

1075
MCQmedium

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

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

SMOTE generates synthetic samples to balance the dataset.

Why this answer

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

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

1076
MCQmedium

A company wants to monitor a deployed model for data drift. Which AWS service should they use?

A.Amazon SageMaker Ground Truth
B.Amazon CloudWatch Logs
C.Amazon SageMaker Clarify
D.Amazon SageMaker Model Monitor
AnswerD

Model Monitor checks for data and model drift.

Why this answer

Amazon SageMaker Model Monitor is the correct service because it is specifically designed to continuously monitor deployed machine learning models for data drift and quality issues. It automatically detects deviations in the input data distribution compared to a baseline, triggering alerts when drift exceeds defined thresholds, which directly addresses the company's requirement.

Exam trap

The trap here is that candidates confuse SageMaker Clarify (bias/explainability) with Model Monitor (drift/quality), as both involve analyzing model behavior but serve fundamentally different purposes.

How to eliminate wrong answers

Option A is wrong because Amazon SageMaker Ground Truth is a data labeling service for creating training datasets, not for monitoring deployed models for drift. Option B is wrong because Amazon CloudWatch Logs is a log aggregation and monitoring service for infrastructure and application logs, but it lacks built-in capabilities to detect statistical data drift in ML model inputs. Option C is wrong because Amazon SageMaker Clarify is designed for bias detection and explainability of model predictions, not for continuous monitoring of data drift in production.

1077
MCQmedium

A data scientist uses Amazon QuickSight to visualize a dataset and observes that a numerical feature has a skewness of 2.5 and a kurtosis of 8. Which transformation should they apply to make the distribution more normal?

A.Standardize the feature using Z-score normalization.
B.Apply a Box-Cox transformation with lambda=0.5.
C.Apply Min-Max scaling to the range [0,1].
D.Apply a log transformation.
AnswerD

Log transformation reduces right skewness.

Why this answer

Apply a log transformation. A skewness of 2.5 indicates a strong right skew (positive skew), and a kurtosis of 8 indicates heavy tails (leptokurtic). Log transformation is effective in reducing right skewness and making the distribution more symmetric, which is a common step toward normality.

Option A (Z-score normalization) standardizes the data but does not change the shape of the distribution. Option B (Box-Cox with lambda=0.5) is a square root transformation, which is less effective than log for high skewness; Box-Cox typically requires choosing an optimal lambda, and lambda=0 would be a log transform. Option C (Min-Max scaling) rescales the range but does not affect skewness or kurtosis.

1078
MCQhard

A company is using AWS Glue to run ETL jobs that transform data for machine learning. The jobs are failing with 'Out of Memory' errors. The data size is growing, and the company needs a cost-effective solution. Which approach should be taken?

A.Switch to Spark on Amazon EMR.
B.Increase the number of workers in the job configuration.
C.Optimize the job by filtering data earlier.
D.Use a larger worker type like G.2X.
AnswerB

Increases parallelism, reducing memory per worker.

Why this answer

Increasing the number of workers in the AWS Glue job configuration distributes the data processing load across more Spark executors, directly addressing the 'Out of Memory' error by providing more aggregate memory without changing the worker type. This is a cost-effective approach because it scales horizontally, often at a lower cost than moving to a larger worker type, and it leverages the existing Glue infrastructure without migrating to EMR.

Exam trap

The trap here is that candidates often assume 'Out of Memory' errors must be solved by increasing memory per worker (vertical scaling) or by switching to a more powerful service, but the most cost-effective and direct solution in AWS Glue is to increase the number of workers (horizontal scaling) to distribute the memory load.

How to eliminate wrong answers

Option A is wrong because switching to Spark on Amazon EMR would require significant architectural changes and operational overhead, and it is not inherently more cost-effective than adjusting Glue worker count for the same memory issue. Option C is wrong because filtering data earlier is a best practice for performance optimization but does not directly resolve an 'Out of Memory' error caused by insufficient total memory across workers; it reduces data volume but may not prevent memory exhaustion if the cluster is undersized. Option D is wrong because using a larger worker type like G.2X increases memory per worker but is typically more expensive than adding more workers of the same type, and it may not be the most cost-effective horizontal scaling solution for growing data.

1079
Multi-Selecteasy

A team wants to move data from an on-premises Oracle database to Amazon S3 for analytics. The pipeline must run daily and handle incremental updates. Which THREE services should they use together? (Choose three.)

Select 3 answers
A.Amazon SageMaker
B.Amazon S3
C.Amazon Athena
D.AWS Database Migration Service (DMS)
E.AWS Glue
AnswersB, D, E

S3 is the target data lake storage.

Why this answer

Amazon S3 is the correct destination for storing the data because it provides a scalable, durable, and cost-effective object storage solution ideal for analytics workloads. The pipeline requires daily incremental updates, and S3 integrates seamlessly with AWS DMS for continuous replication and AWS Glue for ETL processing, making it the central storage layer for the analytics pipeline.

Exam trap

The trap here is that candidates often confuse Amazon Athena as a data ingestion service because it can query S3 data, but it is purely a query engine and cannot move or replicate data from an on-premises database.

1080
MCQmedium

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

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

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

Why this answer

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

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

1081
Multi-Selectmedium

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

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

Median imputation is a robust method that preserves data.

Why this answer

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

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

1082
Multi-Selectmedium

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

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

RMSE measures average prediction error in regression.

Why this answer

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

Exam trap

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

1083
MCQmedium

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

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

Smaller batches use less memory.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1084
MCQmedium

A data scientist is working with a dataset that contains both numerical and categorical features. During EDA, they want to understand the relationship between a categorical feature with 10 unique values and the target variable. Which visualization is most appropriate?

A.Heatmap
B.Box plot
C.Histogram
D.Scatter plot
AnswerB

Box plot shows target distribution across categories.

Why this answer

A box plot is appropriate here because it displays the distribution of a numerical target variable across different categories of a categorical feature, allowing comparison of medians, quartiles, and outliers for each of the 10 categories. Option A is incorrect because a heatmap is typically used to show the correlation between numerical variables or the intensity of two categorical variables, not the relationship between a categorical feature and a target. Option C is incorrect because a histogram shows the distribution of a single numerical variable and cannot incorporate categorical groupings.

Option D is incorrect because a scatter plot visualizes the relationship between two numerical variables, making it unsuitable when one variable is categorical.

1085
MCQhard

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

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

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

Why this answer

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

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

1086
MCQhard

A machine learning engineer is deploying a model on SageMaker and needs to ensure that the endpoint can handle a sudden spike in traffic. The engineer expects traffic to increase by 10x during a promotional event. Which scaling strategy should be used?

A.Use a single large instance type instead of multiple smaller instances.
B.Manually increase the instance count before the event.
C.Use only dynamic scaling based on the average latency metric.
D.Use scheduled scaling to add instances before the event, combined with dynamic scaling for the remaining duration.
AnswerD

Scheduled scaling pre-warms the endpoint to handle the spike.

Why this answer

The correct answer. Scheduled scaling allows you to add instances before the expected traffic spike, ensuring capacity is ready when needed. Combined with dynamic scaling (e.g., based on CPU utilization or request count), you can handle unexpected additional load during the event.

Option A is wrong because a single large instance is a single point of failure and may not provide sufficient throughput for a 10x spike. Option B is wrong because manual scaling requires human intervention and may not react fast enough. Option C is wrong because relying solely on dynamic scaling may not scale up quickly enough for a sudden 10x increase, as there is a lag in metrics and scaling actions.

1087
MCQhard

A company operates a real-time fraud detection system using an Amazon SageMaker endpoint. The model is a gradient boosting model trained on historical transaction data. The endpoint is deployed on an ml.c5.2xlarge instance with auto-scaling enabled based on average latency. Recently, during a flash sale event, the endpoint started returning HTTP 503 errors. The CloudWatch metrics show that the CPU utilization is at 70%, and the average latency has increased from 50 ms to 200 ms. The auto-scaling policy is configured to add one instance when average latency exceeds 100 ms for 5 consecutive minutes, and remove one instance when latency drops below 50 ms for 5 minutes. The current number of instances is 2. The flash sale lasted 30 minutes. What should the company do to prevent this issue in future flash sales?

A.Enable request throttling to drop excess requests
B.Change the instance type to ml.c5.4xlarge to handle higher load
C.Pre-warm the endpoint by setting a minimum number of instances that can handle the expected peak load before the flash sale
D.Change the model to a simpler model with lower latency
AnswerC

This ensures capacity is available from the start.

Why this answer

The auto-scaling policy is reactive and requires a 5-minute evaluation period, which is too slow to handle the rapid traffic spike during a flash sale. Pre-warming the endpoint by setting a minimum number of instances to handle the expected peak load ensures capacity is available immediately. Option A (request throttling) would reject excess requests and cause errors, not prevent them.

Option B (changing instance type) may help handle more load per instance but still suffers from the same reactive scaling delay, and it may be more expensive. Option D (simpler model) could reduce latency but may compromise model accuracy and does not address the scaling issue directly.

1088
Multi-Selecteasy

Which TWO services can be used to transform data in transit within a Kinesis Data Firehose delivery stream? (Choose 2)

Select 2 answers
A.AWS Lambda
B.Amazon Kinesis Data Analytics
C.Amazon Athena
D.Amazon S3
E.AWS Glue
AnswersA, E

Firehose can invoke a Lambda function to transform records.

Why this answer

AWS Lambda is correct because it can be invoked as a transformation function within a Kinesis Data Firehose delivery stream. When you enable data transformation, Firehose buffers incoming records and then calls a Lambda function you specify, passing batches of records for processing. The Lambda function can modify, enrich, filter, or reformat the data before Firehose continues delivering it to the destination.

Exam trap

The trap here is that candidates often confuse 'transformation' with 'analytics' and select Kinesis Data Analytics, not realizing that Firehose's built-in transformation feature is specifically powered by Lambda, not by a separate analytics engine.

1089
Drag & Dropmedium

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

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

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

Why this order

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

1090
MCQmedium

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

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

Gradient accumulation simulates larger batch sizes, improving convergence speed.

Why this answer

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

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

1091
Multi-Selecthard

A machine learning team is using Amazon SageMaker to train a model on a dataset stored in S3. The training job reads data from S3 using Pipe input mode, but the training is slow. The team wants to improve data throughput. Which THREE actions should they take?

Select 3 answers
A.Enable S3 Transfer Acceleration on the bucket.
B.Mount the S3 bucket using an S3 file system and use File mode with a larger instance type.
C.Use Amazon S3 VPC Gateway Endpoint to reduce data transfer costs and improve latency.
D.Use Amazon EFS as the data source for training.
E.Use Amazon ElastiCache to cache the training data.
AnswersB, C, D

File mode with high-bandwidth instances can improve throughput.

Why this answer

Mounting an S3 bucket using an S3 file system (e.g., via mount-s3 or s3fs) and switching to File mode allows the training instance to access data as local files, eliminating the overhead of streaming decompression and per-record parsing inherent in Pipe mode. Using a larger instance type provides more network bandwidth and CPU resources to handle the file I/O, directly improving data throughput for large datasets.

Exam trap

The trap here is that candidates often assume Pipe mode is always faster because it avoids disk writes, but they overlook that File mode with a larger instance can achieve higher throughput by leveraging parallel downloads and local caching, especially when the dataset is large or the algorithm benefits from random access.

1092
MCQhard

A data scientist is analyzing a dataset with a large number of missing values in several columns. The dataset is stored in an Amazon S3 bucket and is about 5 TB in size. The scientist wants to understand the pattern of missingness (e.g., is it missing completely at random, missing at random, or not missing at random) before deciding on an imputation strategy. The scientist has access to AWS Glue DataBrew and Amazon SageMaker Studio. Which approach should the scientist take to best understand the missing data patterns?

A.Use Amazon SageMaker Data Wrangler to create a flow and analyze missingness visually
B.Use AWS Glue DataBrew's data quality and missing data reports
C.Use AWS Glue ETL jobs with PySpark to compute missingness statistics
D.Use Amazon Athena to run queries to find missing values per column
AnswerB

DataBrew's reports visualize missing data patterns and correlations.

Why this answer

AWS Glue DataBrew provides built-in missing data reports that include visualizations such as heatmaps and bar charts to identify patterns of missingness and help determine whether data is MCAR, MAR, or NMAR. Option A is incorrect because SageMaker Data Wrangler, while useful for data preparation, does not have native missingness pattern analysis. Option C is incorrect because AWS Glue ETL jobs require custom PySpark code and are less efficient for exploratory analysis compared to DataBrew's automated reports.

Option D is incorrect because while Amazon Athena can query missing values, it lacks pattern analysis capabilities.

1093
Multi-Selecthard

Which THREE steps should be taken to secure a SageMaker notebook instance that accesses sensitive data? (Select THREE.)

Select 3 answers
A.Enable encryption at rest for the notebook's EBS volume
B.Grant root access to the notebook instance for flexibility
C.Place the notebook instance inside a VPC with no internet access
D.Allow direct internet access from the notebook for downloading packages
E.Use an IAM role with least privilege permissions for the notebook
AnswersA, C, E

Protects stored data.

Why this answer

SageMaker notebook instances use an Amazon EBS volume for storage, and enabling encryption at rest for this volume ensures that sensitive data stored on the notebook (e.g., datasets, model artifacts) is encrypted using AWS KMS-managed keys. This protects data at the storage layer, which is a fundamental security requirement for compliance with standards like HIPAA or PCI DSS.

Exam trap

The trap here is that candidates often confuse 'root access' with necessary administrative flexibility, not realizing that SageMaker notebook instances already provide sufficient permissions via IAM roles, and root access introduces security vulnerabilities without any operational benefit.

1094
Multi-Selecthard

Which TWO of the following are best practices for exploratory data analysis when using Amazon SageMaker Data Wrangler? (Select TWO.)

Select 2 answers
A.Store all intermediate results in Amazon Athena for querying.
B.Use Data Wrangler's built-in data visualizations to explore feature distributions and relationships.
C.Use Amazon EMR to run Spark jobs for data profiling.
D.Always export the data to Amazon QuickSight for analysis before transformation.
E.Export the Data Wrangler flow as a Jupyter notebook to share with the team.
AnswersB, E

Built-in visualizations enable quick EDA.

Why this answer

Data Wrangler's built-in visualizations allow for quick exploration of feature distributions and relationships without leaving the tool, making it a best practice for EDA. Exporting the Data Wrangler flow as a Jupyter notebook enables reproducibility and sharing with the team. Storing intermediate results in Athena (A) is not a best practice specific to Data Wrangler; it adds overhead.

Using EMR for data profiling (C) is unnecessary since Data Wrangler includes profiling capabilities. Exporting data to QuickSight before transformation (D) is not recommended; analysis should be done within Data Wrangler's transformation steps.

1095
Multi-Selecthard

A machine learning team is analyzing a dataset with 10,000 rows and 200 features. They suspect data leakage due to time-based features. Which THREE EDA checks should they perform?

Select 3 answers
A.Plot distribution of each feature in training vs. test sets
B.Apply PCA and check if first two components separate train/test
C.Check whether the dataset is sorted by time and if any feature uses future information
D.Compare feature correlations with target in training and test sets
E.Perform k-means clustering on the whole dataset
AnswersA, C, D

Plotting the distribution of each feature in training vs. test sets helps detect data leakage if the distributions differ significantly (e.g., train contains future data).

Why this answer

Plotting the distribution of each feature in training vs. test sets helps detect data leakage if the distributions differ significantly (e.g., train contains future data). Option C is correct because checking if the dataset is sorted by time and if any feature uses future information directly addresses time-based leakage. Option D is correct because comparing feature correlations with the target in training and test sets can reveal leakage if correlations are abnormally high in training due to future data.

Option B is wrong because PCA is a dimensionality reduction technique and does not directly detect leakage. Option E is wrong because k-means clustering is an unsupervised method and not suitable for leakage detection in this context.

1096
MCQhard

A data engineer runs the above CLI command and sees that the bucket contains many small Parquet files (1 MB each) under the prefix. When querying this data with Athena, the query performance is poor and costs are high. Which approach would MOST improve performance and reduce cost?

A.Convert the files to JSON format
B.Convert the files to CSV format
C.Consolidate the small files into fewer, larger Parquet files
D.Add more partitions by including hour in the prefix
AnswerC

Fewer, larger files reduce overhead and improve compression.

Why this answer

C is correct because consolidating many small Parquet files into fewer, larger files (e.g., 128–256 MB each) reduces the overhead of Amazon Athena's file listing and metadata operations, and improves compression and predicate pushdown efficiency. Parquet is a columnar format optimized for analytics, so keeping it while reducing file count directly addresses the root cause of poor performance and high cost.

Exam trap

The trap here is that candidates may think adding more partitions always improves query performance, but in this scenario with many tiny files, more partitions would exacerbate the small-file problem and increase Athena's overhead.

How to eliminate wrong answers

Option A is wrong because converting to JSON, a text-based row-oriented format, would increase storage size, eliminate columnar compression and predicate pushdown, and worsen Athena performance and cost. Option B is wrong because CSV is also a row-oriented text format that lacks compression and columnar optimizations, leading to higher scan volumes and slower queries. Option D is wrong because adding more partitions (e.g., by hour) would create even more small files and partitions, increasing metadata overhead and potentially degrading performance further, not improving it.

1097
MCQhard

A data scientist is using Amazon SageMaker for hyperparameter tuning. The tuning job uses a Bayesian optimization strategy. After 10 training jobs, the objective metric (validation accuracy) has plateaued at 0.85. The data scientist wants to explore more diverse hyperparameter combinations. What should the data scientist do?

A.Decrease the exploration weight in the tuning job configuration.
B.Switch to random search strategy.
C.Increase the exploration weight in the tuning job configuration.
D.Increase the number of parallel training jobs.
AnswerC

Increasing exploration weight prompts the algorithm to try more diverse combinations.

Why this answer

In Bayesian optimization, the exploration weight controls the trade-off between exploring new hyperparameter regions and exploiting known good regions. Increasing this weight encourages the acquisition function to sample more diverse combinations, which can help escape a plateau. Option C is correct because it directly addresses the need for greater diversity in the search space.

Exam trap

The MLS-C01 exam often tests the misconception that increasing parallel jobs or switching to random search is the best way to increase diversity, when in fact Bayesian optimization's exploration weight is the precise control for this purpose.

How to eliminate wrong answers

Option A is wrong because decreasing the exploration weight would make the tuning job more exploitative, focusing on known good regions and reducing diversity, which is the opposite of what is needed. Option B is wrong because switching to random search would abandon the benefits of Bayesian optimization's informed sampling, potentially wasting resources on random trials without leveraging prior results. Option D is wrong because increasing the number of parallel training jobs does not inherently increase exploration diversity; it only speeds up the tuning process but may lead to less informed decisions if the Bayesian model cannot keep up with parallel evaluations.

1098
Multi-Selectmedium

Which TWO actions are appropriate during exploratory data analysis when you discover that a categorical feature has 50 unique values (high cardinality)?

Select 2 answers
A.Group rare categories into a single 'Other' category.
B.Apply one-hot encoding to create 50 dummy variables.
C.Apply label encoding to assign integers to each category.
D.Drop the feature entirely.
E.Use feature hashing (hashing trick) to reduce dimensionality.
AnswersA, E

Reduces cardinality while keeping most information.

Why this answer

Options A and E are correct. A: Grouping rare categories into an 'Other' category reduces cardinality while preserving information, which is appropriate for high-cardinality categorical features. E: Feature hashing (hashing trick) transforms high-cardinality features into a fixed-size vector, reducing dimensionality.

Option B is incorrect because one-hot encoding with 50 categories creates many sparse columns, which can be problematic for model performance and memory. Option C is incorrect because label encoding implies an ordinal relationship, which may not exist, and can mislead models. Option D is incorrect because dropping the feature may lose important information; other techniques like grouping or hashing are preferable.

1099
MCQmedium

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1100
MCQeasy

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

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

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

Why this answer

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

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

1101
MCQhard

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

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

Pipe mode starts training immediately by streaming data.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1102
MCQeasy

A company is using SageMaker to deploy a model for real-time inference. The model requires low latency, and the company wants to test the endpoint before production. Which approach should be used to validate endpoint performance?

A.Use CloudWatch Synthetics to create a canary.
B.Perform offline batch evaluation on a test dataset.
C.Deploy to production and monitor using CloudWatch.
D.Use SageMaker's built-in shadow testing or load testing features.
AnswerD

Allows traffic simulation and latency measurement.

Why this answer

SageMaker provides features like shadow testing, which allows you to test a new variant alongside the existing production variant without impacting live traffic, and integration with load testing tools to simulate traffic and measure latency before full production deployment. Option A is incorrect because CloudWatch Synthetics is used for monitoring endpoint health and availability, not for pre-production load or performance testing. Option B is incorrect because offline batch evaluation assesses model accuracy on a static dataset, but does not test real-time inference performance metrics such as latency and throughput.

Option C is incorrect because deploying directly to production and monitoring exposes users to potential performance issues; pre-production validation should be conducted first.

1103
MCQmedium

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

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

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

Why this answer

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

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

1104
MCQmedium

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

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

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

Why this answer

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

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

Exam trap

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

1105
Multi-Selecthard

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

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

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

Why this answer

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

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

1106
MCQeasy

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

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

SageMaker needs ListBucket permission to access objects.

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

1107
Multi-Selectmedium

Which TWO factors should be considered when choosing between Amazon SageMaker's real-time endpoints and serverless inference? (Select TWO.)

Select 2 answers
A.GPU requirement
B.Inference traffic pattern (intermittent vs steady)
C.Integration with AWS Lambda
D.Availability of built-in algorithms
E.Model size in GB
AnswersA, B

Serverless inference does not support GPU instances.

Why this answer

GPU requirement is a key factor because SageMaker real-time endpoints support GPU-based instances (e.g., ml.p3, ml.g4dn) for low-latency inference on deep learning models, while serverless inference only supports CPU instances. If your model requires GPU acceleration for acceptable latency, you must choose a real-time endpoint.

Exam trap

Candidates often mistakenly think serverless inference cannot handle large models or lacks Lambda integration, but the real differentiators are GPU support and traffic pattern suitability.

1108
MCQmedium

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

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

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

Why this answer

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

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

1109
Multi-Selecteasy

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

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

F1 score balances precision and recall.

Why this answer

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

Exam trap

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

1110
MCQmedium

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

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

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

Why this answer

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

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

1111
Multi-Selectmedium

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

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

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

Why this answer

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

Exam trap

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

1112
MCQhard

A data scientist is analyzing a dataset with a binary target variable. The dataset is highly imbalanced (99% negative class). Which metric is most appropriate for evaluating the model's performance during exploratory data analysis?

A.Accuracy
B.Precision
C.F1 Score
D.Area Under the ROC Curve (AUC-ROC)
AnswerD

AUC-ROC is insensitive to class imbalance and provides a global measure of performance.

Why this answer

In highly imbalanced datasets (99% negative class), accuracy is misleading because a model that predicts the majority class always achieves 99% accuracy. Precision focuses on false positives and is threshold-dependent. F1 score balances precision and recall but is sensitive to the chosen threshold and may not reflect overall performance.

AUC-ROC evaluates the model's ability to distinguish between classes across all thresholds and is robust to class imbalance, making it the most appropriate metric for initial model evaluation.

1113
MCQhard

The exhibit shows an Athena query result from a table. What is the output of the query?

A.3, 3, 4
B.2, 3, 3
C.2, 4, 4
D.2, 4, 3
AnswerC

Correct counts: col2 non-null=2, rows=4, distinct col1=4.

Why this answer

The query returns COUNT(col2)=2 (only rows 1 and 3 have non-null col2), COUNT(*)=4 (total rows), COUNT(DISTINCT col1)=4 (distinct values A, B, C, D). Option A is wrong because COUNT(col2) is 2, not 3. Option B is wrong because COUNT(*) is 4, not 3.

Option D is wrong because COUNT(DISTINCT col1) is 4, not 3.

1114
MCQmedium

An Athena query SELECT COUNT(*) FROM table WHERE col1 IS NULL returns the value 5000. What does this value represent?

A.The total number of rows in the table
B.The number of rows where col1 is NULL
C.The number of rows where col1 is not NULL
D.The number of distinct values in col1
AnswerB

The query counts rows where col1 IS NULL, and the result '5000' is that count.

Why this answer

The exhibit shows the result of an Athena query that counts the number of rows where col1 is NULL. The value 5000 is that count. Therefore, Option B is correct.

Option A is incorrect because the query does not count total rows; it filters for NULLs. Option C is incorrect because the query counts NULL rows, not non-NULL. Option D is incorrect because the query does not use DISTINCT to count distinct values.

1115
Multi-Selectmedium

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

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

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

Why this answer

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

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

1116
MCQhard

A data scientist is exploring a dataset with 500 features and 10,000 samples. The data scientist computes the pairwise correlation matrix and finds that many features have correlations above 0.9. The data scientist wants to reduce the dataset to 50 features while preserving as much variance as possible. Which technique should be used?

A.Remove all but one feature from each group of highly correlated features.
B.Apply Principal Component Analysis (PCA) and keep the top 50 principal components.
C.Use Linear Discriminant Analysis (LDA) to project to 50 dimensions.
D.Use t-Distributed Stochastic Neighbor Embedding (t-SNE) to reduce to 50 dimensions.
AnswerB

PCA finds orthogonal directions of maximum variance and can reduce dimensionality effectively.

Why this answer

Principal Component Analysis (PCA) is the correct technique because it performs an orthogonal linear transformation that projects the original 500 features into a new coordinate system where the axes (principal components) are ordered by the variance they capture. By keeping the top 50 principal components, the data scientist retains the maximum possible variance in the reduced 50-dimensional space, directly addressing the goal of preserving variance while handling high multicollinearity.

Exam trap

The MLS-C01 exam often tests the distinction between unsupervised variance-preserving techniques (PCA) and supervised or visualization-specific techniques (LDA, t-SNE), leading candidates to mistakenly choose LDA for dimensionality reduction without recognizing its supervised nature and dimension limit.

How to eliminate wrong answers

Option A is wrong because simply removing all but one feature from each group of highly correlated features is a heuristic that does not guarantee preserving maximum variance; it discards potentially useful information and does not leverage the correlation structure to create new, uncorrelated features. Option C is wrong because Linear Discriminant Analysis (LDA) is a supervised technique that requires class labels to maximize class separability, not variance preservation, and it can project to at most (number of classes - 1) dimensions, which is typically far fewer than 50. Option D is wrong because t-Distributed Stochastic Neighbor Embedding (t-SNE) is a non-linear, stochastic dimensionality reduction technique primarily used for visualization of high-dimensional data in 2 or 3 dimensions; it does not preserve global variance structure and is not suitable for reducing to 50 dimensions while retaining maximum variance.

1117
Matchingmedium

Match each ML model evaluation concept to its definition.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Model performs well on training data but poorly on unseen data

Model fails to capture underlying patterns in data

Error from wrong assumptions in the learning algorithm

Error from sensitivity to small fluctuations in training data

Balance between underfitting and overfitting

Why these pairings

Precision, Recall, F1 Score, and ROC AUC are key evaluation metrics. Common confusions include swapping Accuracy, Specificity, and Precision definitions.

1118
MCQmedium

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

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

XGBoost can run on CPU; use CPU instance.

Why this answer

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

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

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

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

1119
MCQmedium

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

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

Real-time endpoints provide low-latency inference.

Why this answer

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

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

1120
MCQhard

A company uses Amazon SageMaker to train a regression model. After training, the data scientist notices that the training loss decreases but validation loss increases after a few epochs. Which EDA technique could have helped predict this behavior?

A.Create box plots of each feature to identify outliers
B.Plot learning curves showing training and validation loss over epochs
C.Generate residual plots to check heteroscedasticity
D.Plot confusion matrix on the validation set
AnswerB

Learning curves plot training and validation loss over epochs; when validation loss starts increasing while training loss continues decreasing, it signals overfitting.

Why this answer

Plotting learning curves, which show training and validation loss over epochs, is the correct EDA technique to detect overfitting. The divergence where training loss decreases but validation loss increases is a clear sign of overfitting. Option A (box plots) helps identify outliers but does not directly indicate overfitting.

Option C (residual plots) checks for homoscedasticity in regression, not overfitting. Option D (confusion matrix) is used for classification, not regression.

1121
Multi-Selecteasy

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

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

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

Why this answer

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

Exam trap

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

1122
Multi-Selectmedium

A data scientist is using Amazon SageMaker to perform exploratory data analysis on a dataset with missing values and outliers. Which TWO actions should the scientist take to understand the data quality? (Choose TWO.)

Select 2 answers
A.Build a scatterplot matrix to visualize pairwise relationships
B.Use histograms to visualize the distribution of each numerical feature
C.Plot a confusion matrix to assess class separation
D.Create a correlation matrix to identify redundant features
E.Generate summary statistics using df.describe() in a SageMaker notebook
AnswersB, E

Histograms reveal outliers, skewness, and missing data patterns (e.g., zero counts).

Why this answer

Histograms show the distribution of numerical features, helping to identify skewness and outliers. Option E is correct because summary statistics like df.describe() provide count, mean, min, max, and quartiles, which reveal missing values (via count) and outliers (via min/max). Option A is incorrect because a scatterplot matrix visualizes pairwise relationships but does not directly show missing values or outliers.

Option C is incorrect because a confusion matrix is used for evaluating classification model performance, not for data exploration. Option D is incorrect because a correlation matrix shows relationships between features but does not highlight missing values or outliers.

1123
MCQeasy

A data scientist needs to version control datasets used for machine learning experiments. Which AWS service should the data scientist use?

A.AWS Lake Formation
B.Amazon SageMaker Feature Store
C.Amazon SageMaker Model Registry
D.Amazon S3 with versioning enabled
AnswerD

S3 versioning provides dataset version control.

Why this answer

Amazon S3 with versioning enabled is the correct choice because it provides a simple, scalable, and cost-effective way to version control datasets. S3 versioning preserves every object version, allowing you to retrieve, restore, or compare previous dataset states, which is essential for reproducibility in ML experiments. This directly meets the requirement for dataset version control without additional overhead.

Exam trap

The trap here is that candidates confuse services designed for model management (Model Registry) or feature management (Feature Store) with the fundamental storage versioning capability of S3, which is the simplest and most direct answer for dataset version control.

How to eliminate wrong answers

Option A is wrong because AWS Lake Formation is a service for building, securing, and managing data lakes, not for version controlling individual datasets used in ML experiments. Option B is wrong because Amazon SageMaker Feature Store is designed to store, manage, and share ML features (preprocessed data for training and inference), not for versioning raw datasets. Option C is wrong because Amazon SageMaker Model Registry is used to catalog, version, and manage trained ML models, not datasets.

1124
Multi-Selectmedium

Which THREE techniques are commonly used to detect outliers in a dataset? (Select THREE.)

Select 3 answers
A.Interquartile range (IQR)
B.k-means clustering
C.Principal component analysis (PCA)
D.Z-score
E.Isolation Forest
AnswersA, D, E

IQR is a common statistical method to detect outliers by identifying data points beyond 1.5 times the IQR from the quartiles.

Why this answer

Options A, D, and E are correct. Z-score and IQR are standard statistical methods for identifying outliers. Isolation Forest is a machine learning algorithm specifically designed for anomaly detection.

Option B (k-means clustering) is incorrect because it is a clustering algorithm, not typically used for outlier detection. Option C (PCA) is incorrect because principal component analysis is used for dimensionality reduction, though it can be used in some outlier detection contexts, it is not one of the three most common techniques.

1125
MCQhard

A data engineering team is designing a data lake on Amazon S3. The data is ingested from multiple sources in JSON, CSV, and Parquet formats. The team needs to make the data available for analysis using Amazon Athena and Amazon Redshift Spectrum. The team wants to minimize data transformation costs and storage overhead. Which data storage approach should the team use?

A.Load the data into Amazon Redshift cluster and then unload to S3 in Parquet
B.Store the data in its original format in S3 and use Athena to query directly
C.Store the data in its original format and use AWS Glue to convert to Parquet when queried
D.Convert all data to Apache Parquet before storing in S3
AnswerD

Parquet is columnar, reducing storage and improving query performance.

Why this answer

Converting all data to Apache Parquet before storing in S3 minimizes storage overhead and improves query performance. Parquet is a columnar format that provides efficient compression and encoding schemes, reducing storage costs. It is natively supported by Amazon Athena and Redshift Spectrum, enabling fast analytics without on-the-fly conversion.

Option B (storing in original format) increases storage costs and can degrade query performance, especially with JSON or CSV. Option C incurs transformation costs each time data is queried, negating any storage benefit. Option A adds unnecessary transformation steps and cluster costs.

Therefore, upfront conversion to Parquet is the most cost-effective strategy for this use case.

Page 14

Page 15 of 23

Page 16