An aircraft engine manufacturing company is measuring 200 performance metrics in a
time-series. Engineers
want to detect critical manufacturing defects in near-real time during testing. All of the data
needs to be stored
for offline analysis.
What approach would be the MOST effective to perform near-real time defect detection?
Show answerHide answer
Correct answer: DUse Amazon Kinesis Data Firehose for ingestion and Amazon Kinesis Data Analytics Random Cut Forest
(RCF) to perform anomaly detection. Use Kinesis Data Firehose to store data in Amazon
S3 for further
analysis.
Explanation
Explanation:
The company wants to perform near-real time defect detection on a time-series of
200 performance metrics, and store all the data for offline analysis. The best
approach for this scenario is to use Amazon Kinesis Data Firehose for ingestion
and Amazon Kinesis Data Analytics Random Cut Forest (RCF) to perform
anomaly detection. Use Kinesis Data Firehose to store data in Amazon S3 for
further analysis.
Amazon Kinesis Data Firehose is a service that can capture, transform, and
deliver streaming data to destinations such as Amazon S3, Amazon Redshift,
Amazon OpenSearch Service, and Splunk. Kinesis Data Firehose can handle any
amount and frequency of data, and automatically scale to match the throughput.
Kinesis Data Firehose can also compress, encrypt, and batch the data before
delivering it to the destination, reducing the storage cost and enhancing the
security.
Amazon Kinesis Data Analytics is a service that can analyze streaming data in real
time using SQL or Apache Flink applications. Kinesis Data Analytics can use builtin
functions and algorithms to perform various analytics tasks, such as
aggregations, joins, filters, windows, and anomaly detection. One of the built-in
algorithms that Kinesis Data Analytics supports is Random Cut Forest (RCF),
which is a supervised learning algorithm for forecasting scalar time series using
recurrent neural networks. RCF can detect anomalies in streaming data by
assigning an anomaly score to each data point, based on how distant it is from the
rest of the data. RCF can handle multiple related time series, such as the
performance metrics of the aircraft engine, and learn a global model that captures
the common patterns and trends across the time series.
Therefore, the company can use the following architecture to build the near-real
time defect detection solution:
Question 32Choose 1
A company is setting up a mechanism for data scientists and engineers from different
departments to access an Amazon SageMaker Studio domain. Each department has a
unique SageMaker Studio domain.
The company wants to build a central proxy application that data scientists and engineers
can log in to by using their corporate credentials. The proxy application will authenticate
users by using the company's existing Identity provider (IdP). The application will then
route users to the appropriate SageMaker Studio domain.
The company plans to maintain a table in Amazon DynamoDB that contains SageMaker
domains for each department.
How should the company meet these requirements?
Show answerHide answer
Correct answer: AUse the SageMaker CreatePresignedDomainUrl API to generate a presigned URL for
each domain according to the DynamoDB table. Pass the presigned URL to the proxy
application.
Explanation
Explanation: The SageMaker CreatePresignedDomainUrl API is the best option to meet
the requirements of the company. This API creates a URL for a specified UserProfile in a
Domain. When accessed in a web browser, the user will be automatically signed in to the
domain, and granted access to all of the Apps and files associated with the Domain’s
Amazon Elastic File System (EFS) volume. This API can only be called when the
authentication mode equals IAM, which means the company can use its existing IdP to
authenticate users.
The company can use the DynamoDB table to store the domain IDs
and user profile names for each department, and use the proxy application to query the
table and generate the presigned URL for the appropriate domain according to the user’s
credentials. The presigned URL is valid only for a specified duration, which can be set by
the SessionExpirationDurationInSeconds parameter. This can help enhance the security
and prevent unauthorized access to the domains.
The other options are not suitable for the company’s requirements. The SageMaker
CreateHumanTaskUi API is used to define the settings for the human review workflow user
interface, which is not related to accessing the SageMaker Studio domains. The
SageMaker ListHumanTaskUis API is used to return information about the human task
user interfaces in the account, which is also not relevant to the company’s use case. The
SageMaker CreatePresignedNotebookInstanceUrl API is used to create a URL to connect
to the Jupyter server from a notebook instance, which is different from accessing the
SageMaker Studio domain.
Question 33Choose 1
A data science team is planning to build a natural language processing (NLP) application.
The application’s text preprocessing stage will include part-of-speech tagging and key
phase extraction. The preprocessed text will be input to a custom classification algorithm
that the data science team has already written and trained using Apache MXNet.
Which solution can the team build MOST quickly to meet these requirements?
Show answerHide answer
Correct answer: DUse Amazon Comprehend for the part-of-speech tagging and key phase extraction
tasks. Use AWS Deep Learning Containers with Amazon SageMaker to build the custom
classifier.
Explanation
Explanation: Amazon Comprehend is a natural language processing (NLP) service that
can perform part-of-speech tagging and key phrase extraction tasks. AWS Deep Learning
Containers are Docker images that are pre-installed with popular deep learning frameworks
such as Apache MXNet. Amazon SageMaker is a fully managed service that can help
build, train, and deploy machine learning models. Using Amazon Comprehend for the text
preprocessing tasks and AWS Deep Learning Containers with Amazon SageMaker to build
the custom classifier is the solution that can be built most quickly to meet the requirements.
Question 34Choose 1
An agricultural company is interested in using machine learning to detect specific types of
weeds in a 100-acre grassland field. Currently, the company uses tractor-mounted
cameras to capture multiple images of the field as 10 × 10 grids. The company also has a
large training dataset that consists of annotated images of popular weed classes like
broadleaf and non-broadleaf docks.
The company wants to build a weed detection model that will detect specific types of
weeds and the location of each type within the field. Once the model is ready, it will be
hosted on Amazon SageMaker endpoints. The model will perform real-time inferencing
using the images captured by the cameras.
Which approach should a Machine Learning Specialist take to obtain accurate predictions?
Show answerHide answer
Correct answer: CPrepare the images in RecordIO format and upload them to Amazon S3. Use Amazon
SageMaker to train, test, and validate the model using an object-detection single-shot
multibox detector (SSD) algorithm.
Explanation
Explanation: The problem of detecting specific types of weeds and their location within
the field is an example of object detection, which is a type of machine learning model that
identifies and localizes objects in an image. Amazon SageMaker provides a built-in object
detection algorithm that uses a single-shot multibox detector (SSD) to perform real-time
inference on streaming images. The SSD algorithm can handle multiple objects of varying
sizes and scales in an image, and generate bounding boxes and scores for each object
category. Therefore, option C is the best approach to obtain accurate predictions.
Option A is incorrect because image classification is a type of machine learning model that
assigns a label to an image based on predefined categories. Image classification is not
suitable for localizing objects within an image, as it does not provide bounding boxes or
scores for each object.
Option B is incorrect because Apache Parquet is a columnar
storage format that is optimized for analytical queries. Apache Parquet is not suitable for
storing images, as it does not preserve the spatial information of the pixels.
Option D is
incorrect because it combines the wrong format (Apache Parquet) and the wrong algorithm
(image classification) for the given problem, as explained in options A and B.
Question 35Choose 1
A Machine Learning Specialist must build out a process to query a dataset on Amazon S3
using Amazon Athena The dataset contains more than 800.000 records stored as plaintext
CSV files Each record contains 200 columns and is approximately 1 5 MB in size Most
queries will span 5 to 10 columns only
How should the Machine Learning Specialist transform the dataset to minimize query
runtime?
Show answerHide answer
Correct answer: AConvert the records to Apache Parquet format
Explanation
Explanation:
Amazon Athena is an interactive query service that allows you to
analyze data stored in Amazon S3 using standard SQL. Athena is serverless, so
you only pay for the queries that you run and there is no infrastructure to manage.
To optimize the query performance of Athena, one of the best practices is to
convert the data into a columnar format, such as Apache Parquet or Apache ORC.
Columnar formats store data by columns rather than by rows, which allows Athena
to scan only the columns that are relevant to the query, reducing the amount of
data read and improving the query speed. Columnar formats also support
compression and encoding schemes that can reduce the storage space and the
data scanned per query, further enhancing the performance and reducing the cost.
In contrast, plaintext CSV files store data by rows, which means that Athena has to
scan the entire row even if only a few columns are needed for the query. This
increases the amount of data read and the query latency. Moreover, plaintext CSV
files do not support compression or encoding, which means that they take up more
storage space and incur higher query costs.
Therefore, the Machine Learning Specialist should transform the dataset to
Apache Parquet format to minimize query runtime.
Question 36Choose 1
A manufacturer is operating a large number of factories with a complex supply chain
relationship where unexpected downtime of a machine can cause production to stop at
several factories. A data scientist wants to analyze sensor data from the factories to identify
equipment in need of preemptive maintenance and then dispatch a service team to prevent
unplanned downtime. The sensor readings from a single machine can include up to 200
data points including temperatures, voltages, vibrations, RPMs, and pressure readings.
To collect this sensor data, the manufacturer deployed Wi-Fi and LANs across the
factories. Even though many factory locations do not have reliable or high-speed internet
connectivity, the manufacturer would like to maintain near-real-time inference capabilities.
Which deployment architecture for the model will address these business requirements?
Show answerHide answer
Correct answer: BDeploy the model on AWS IoT Greengrass in each factory. Run sensor data through this
model to infer which machines need maintenance.
Explanation
Explanation: AWS IoT Greengrass is a service that extends AWS to edge devices, such
as sensors and machines, so they can act locally on the data they generate, while still
using the cloud for management, analytics, and durable storage. AWS IoT Greengrass
enables local device messaging, secure data transfer, and local computing using AWS
Lambda functions and machine learning models. AWS IoT Greengrass can run machine learning inference locally on devices using models that are created and trained in the
cloud. This allows devices to respond quickly to local events, even when they are offline or
have intermittent connectivity. Therefore, option B is the best deployment architecture for
the model to address the business requirements of the manufacturer.
Option A is incorrect because deploying the model in Amazon SageMaker would require
sending the sensor data to the cloud for inference, which would not work well for factory
locations that do not have reliable or high-speed internet connectivity. Moreover, this option
would not provide near-real-time inference capabilities, as there would be latency and
bandwidth issues involved in transferring the data to and from the cloud.
Option C is
incorrect because deploying the model to an Amazon SageMaker batch transformation job
would not provide near-real-time inference capabilities, as batch transformation is an
asynchronous process that operates on large datasets. Batch transformation is not suitable
for streaming data that requires low-latency responses.
Option D is incorrect because
deploying the model in Amazon SageMaker and using an IoT rule to write data to an
Amazon DynamoDB table would also require sending the sensor data to the cloud for
inference, which would have the same drawbacks as option A. Moreover, this option would
introduce additional complexity and cost by involving multiple services, such as IoT Core,
DynamoDB, and Lambda.
Question 37Choose 1
A Data Scientist is training a multilayer perception (MLP) on a dataset with multiple
classes. The target class of interest is unique compared to the other classes within the
dataset, but it does not achieve and acceptable ecall metric. The Data Scientist has already
tried varying the number and size of the MLP’s hidden layers,
which has not significantly improved the results. A solution to improve recall must be
implemented as quickly as possible.
Which techniques should be used to meet these requirements?
Show answerHide answer
Correct answer: DAdd class weights to the MLP’s loss function and then retrain
Explanation
Explanation: The best technique to improve the recall of the MLP for the target class of
interest is to add class weights to the MLP’s loss function and then retrain. Class weights
are a way of assigning different importance to each class in the dataset, such that the
model will pay more attention to the classes with higher weights. This can help mitigate the
class imbalance problem, where the model tends to favor the majority class and ignore the
minority class. By increasing the weight of the target class of interest, the model will try to
reduce the false negatives and increase the true positives, which will improve the recall
metric. Adding class weights to the loss function is also a quick and easy solution, as it
does not require gathering more data, changing the model architecture, or switching to a
different algorithm.
Question 38Choose 1
A Machine Learning Specialist is configuring automatic model tuning in Amazon
SageMaker
When using the hyperparameter optimization feature, which of the following guidelines
should be followed to improve optimization?
Choose the maximum number of hyperparameters supported by
Show answerHide answer
Correct answer: CUse log-scaled hyperparameters to allow the hyperparameter space to be searched as
quickly as possible
Explanation
Explanation: Using log-scaled hyperparameters is a guideline that can improve the
automatic model tuning in Amazon SageMaker. Log-scaled hyperparameters are
hyperparameters that have values that span several orders of magnitude, such as learning
rate, regularization parameter, or number of hidden units. Log-scaled hyperparameters can
be specified by using a log-uniform distribution, which assigns equal probability to each
order of magnitude within a range. For example, a log-uniform distribution between 0.001
and 1000 can sample values such as 0.001, 0.01, 0.1, 1, 10, 100, or 1000 with equal
probability. Using log-scaled hyperparameters can allow the hyperparameter optimization
feature to search the hyperparameter space more efficiently and effectively, as it can
explore different scales of values and avoid sampling values that are too small or too large.
Using log-scaled hyperparameters can also help avoid numerical issues, such as underflow
or overflow, that may occur when using linear-scaled hyperparameters. Using log-scaled
hyperparameters can be done by setting the ScalingType parameter to Logarithmic when
defining the hyperparameter ranges in Amazon SageMaker.
The other options are not valid or relevant guidelines for improving the automatic model
tuning in Amazon SageMaker. Choosing the maximum number of hyperparameters
supported by Amazon SageMaker to search the largest number of combinations possible is
not a good practice, as it can increase the time and cost of the tuning job and make it
harder to find the optimal values. Amazon SageMaker supports up to 20 hyperparameters
for tuning, but it is recommended to choose only the most important and influential
hyperparameters for the model and algorithm, and use default or fixed values for the
rest. Specifying a very large hyperparameter range to allow Amazon SageMaker to cover
every possible value is not a good practice, as it can result in sampling values that are
irrelevant or impractical for the model and algorithm, and waste the tuning budget. It is
recommended to specify a reasonable and realistic hyperparameter range based on the
prior knowledge and experience of the model and algorithm, and use the results of the
tuning job to refine the range if needed. Executing only one hyperparameter tuning job at a
time and improving tuning through successive rounds of experiments is not a good
practice, as it can limit the exploration and exploitation of the hyperparameter space and
make the tuning process slower and less efficient. It is recommended to use parallelism
and concurrency to run multiple training jobs simultaneously and leverage the Bayesian
optimization algorithm that Amazon SageMaker uses to guide the search for the best
hyperparameter values.
Question 39Choose 1
An online reseller has a large, multi-column dataset with one column missing 30% of its
data A Machine Learning Specialist believes that certain columns in the dataset could be
used to reconstruct the missing data.
Which reconstruction approach should the Specialist use to preserve the integrity of the dataset?
Show answerHide answer
Correct answer: CMultiple imputation
Explanation
Explanation: Multiple imputation is a technique that uses machine learning to generate
multiple plausible values for each missing value in a dataset, based on the observed data
and the relationships among the variables. Multiple imputation preserves the integrity of the
dataset by accounting for the uncertainty and variability of the missing data, and avoids the
bias and loss of information that may result from other methods, such as listwise deletion,
last observation carried forward, or mean substitution. Multiple imputation can improve the
accuracy and validity of statistical analysis and machine learning models that use the
imputed dataset.
Question 40Choose 1
A retail company wants to combine its customer orders with the product description data
from its product catalog. The structure and format of the records in each dataset is
different. A data analyst tried to use a spreadsheet to combine the datasets, but the effort
resulted in duplicate records and records that were not properly combined. The company
needs a solution that it can use to combine similar records from the two datasets and
remove any duplicates.
Which solution will meet these requirements?
Show answerHide answer
Correct answer: CCreate AWS Glue crawlers for reading and populating the AWS Glue Data Catalog. Use
the FindMatches transform to cleanse the data.
Explanation
Explanation: The FindMatches transform is a machine learning transform that can identify
and match similar records from different datasets, even when the records do not have a
common unique identifier or exact field values. The FindMatches transform can also
remove duplicate records from a single dataset. The FindMatches transform can be used
with AWS Glue crawlers and jobs to process the data from various sources and store it in a
data lake. The FindMatches transform can be created and managed using the AWS Glue
console, API, or AWS Glue Studio.
The other options are not suitable for this use case because:
Option A: Using an AWS Lambda function to process the data and compare equal
strings in the fields from the two datasets is not an efficient or scalable solution. It
would require writing custom code and handling the data loading and cleansing
logic. It would also not account for variations or inconsistencies in the field values,
such as spelling errors, abbreviations, or missing data.
Option B: The AWS Glue SearchTables API operation is used to search for tables
in the AWS Glue Data Catalog based on a set of criteria. It is not a machine
learning transform that can match records across different datasets or remove
duplicates. It would also require writing custom code to invoke the API and
process the results.
Option D: AWS Lake Formation does not provide a custom transform feature. It
provides predefined blueprints for common data ingestion scenarios, such as
database snapshot, incremental database, and log file. These blueprints do not
support matching records across different datasets or removing duplicates.
Full mock exam
Sit the MLS-C01 exam before exam day
Full-length mocks with the same number of questions and the same time limit as the real MLS-C01 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.