amazon AWS Certified Machine Learning Specialty - MLS-C01 practice test


Question 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 recall metric. The Data
Scientist has already tried varying the number and size of the MLPs 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?

  • A. Gather more data using Amazon Mechanical Turk and then retrain
  • B. Train an anomaly detection model instead of an MLP
  • C. Train an XGBoost model instead of an MLP
  • D. Add class weights to the MLP’s loss function and then retrain
Answer:

C

Discussions

Question 2

A Machine Learning Specialist is working with a large company to leverage machine learning within its products. The
company wants to group its customers into categories based on which customers will and will not churn within the next 6
months. The company has labeled the data available to the Specialist.
Which machine learning model type should the Specialist use to accomplish this task?

  • A. Linear regression
  • B. Classification
  • C. Clustering
  • D. Reinforcement learning
Answer:

B

Explanation:
The goal of classification is to determine to which class or category a data point (customer in our case) belongs to. For
classification problems, data scientists would use historical data with predefined target variables AKA labels (churner/non-
churner) answers that need to be predicted to train an algorithm. With classification, businesses can answer the following
questions:
Will this customer churn or not?

Will a customer renew their subscription?

Will a user downgrade a pricing plan?

Are there any signs of unusual customer behavior?

Reference: https://www.kdnuggets.com/2019/05/churn-prediction-machine-learning.html

Discussions

Question 3

A company that manufactures mobile devices wants to determine and calibrate the appropriate sales price for its devices.
The company is collecting the relevant data and is determining data features that it can use to train machine learning (ML)
models. There are more than 1,000 features, and the company wants to determine the primary features that contribute to the
sales price.
Which techniques should the company use for feature selection? (Choose three.)

  • A. Data scaling with standardization and normalization
  • B. Correlation plot with heat maps
  • C. Data binning
  • D. Univariate selection
  • E. Feature importance with a tree-based classifier
  • F. Data augmentation
Answer:

C D F

Explanation:
Reference: https://towardsdatascience.com/an-overview-of-data-preprocessing-features-enrichment-automatic-feature-
selection-60b0c12d75ad
https://towardsdatascience.com/feature-selection-using-python-for-classification-problem-
b5f00a1c7028#:~:text=Univariate%20feature%20selection%20works%20by,analysis%20of%20variance%20
(ANOVA).&text=That%20is%20why%20it%20is%20called%20'univariate' https://arxiv.org/abs/2101.04530

Discussions

Question 4

A telecommunications company is developing a mobile app for its customers. The company is using an Amazon SageMaker
hosted endpoint for machine learning model inferences.
Developers want to introduce a new version of the model for a limited number of users who subscribed to a preview feature
of the app. After the new version of the model is tested as a preview, developers will evaluate its accuracy. If a new version
of the model has better accuracy, developers need to be able to gradually release the new version for all users over a fixed
period of time.
How can the company implement the testing model with the LEAST amount of operational overhead?

  • A. Update the ProductionVariant data type with the new version of the model by using the CreateEndpointConfig operation with the InitialVariantWeight parameter set to 0. Specify the TargetVariant parameter for InvokeEndpoint calls for users who subscribed to the preview feature. When the new version of the model is ready for release, gradually increase InitialVariantWeight until all users have the updated version.
  • B. Configure two SageMaker hosted endpoints that serve the different versions of the model. Create an Application Load Balancer (ALB) to route traffic to both endpoints based on the TargetVariant query string parameter. Reconfigure the app to send the TargetVariant query string parameter for users who subscribed to the preview feature. When the new version of the model is ready for release, change the ALB's routing algorithm to weighted until all users have the updated version.
  • C. Update the DesiredWeightsAndCapacity data type with the new version of the model by using the UpdateEndpointWeightsAndCapacities operation with the DesiredWeight parameter set to 0. Specify the TargetVariant parameter for InvokeEndpoint calls for users who subscribed to the preview feature. When the new version of the model is ready for release, gradually increase DesiredWeight until all users have the updated version.
  • D. Configure two SageMaker hosted endpoints that serve the different versions of the model. Create an Amazon Route 53 record that is configured with a simple routing policy and that points to the current version of the model. Configure the mobile app to use the endpoint URL for users who subscribed to the preview feature and to use the Route 53 record for other users. When the new version of the model is ready for release, add a new model version endpoint to Route 53, and switch the policy to weighted until all users have the updated version.
Answer:

D

Discussions

Question 5

A Machine Learning Specialist is assigned to a Fraud Detection team and must tune an XGBoost model, which is working
appropriately for test data. However, with unknown data, it is not working as expected. The existing parameters are provided
as follows.

Which parameter tuning guidelines should the Specialist follow to avoid overfitting?

  • A. Increase the max_depth parameter value.
  • B. Lower the max_depth parameter value.
  • C. Update the objective to binary:logistic.
  • D. Lower the min_child_weight parameter value.
Answer:

B

Discussions

Question 6

A company uses a long short-term memory (LSTM) model to evaluate the risk factors of a particular energy sector. The
model reviews multi-page text documents to analyze each sentence of the text and categorize it as either a potential risk or
no risk. The model is not performing well, even though the Data Scientist has experimented with many different network
structures and tuned the corresponding hyperparameters.
Which approach will provide the MAXIMUM performance boost?

  • A. Initialize the words by term frequency-inverse document frequency (TF-IDF) vectors pretrained on a large collection of news articles related to the energy sector.
  • B. Use gated recurrent units (GRUs) instead of LSTM and run the training process until the validation loss stops decreasing.
  • C. Reduce the learning rate and run the training process until the training loss stops decreasing.
  • D. Initialize the words by word2vec embeddings pretrained on a large collection of news articles related to the energy sector.
Answer:

C

Discussions

Question 7

A Machine Learning Specialist has completed a proof of concept for a company using a small data sample, and now the
Specialist is ready to implement an end-to-end solution in AWS using Amazon SageMaker. The historical training data is
stored in Amazon RDS.
Which approach should the Specialist use for training a model using that data?

  • A. Write a direct connection to the SQL database within the notebook and pull data in
  • B. Push the data from Microsoft SQL Server to Amazon S3 using an AWS Data Pipeline and provide the S3 location within the notebook.
  • C. Move the data to Amazon DynamoDB and set up a connection to DynamoDB within the notebook to pull data in.
  • D. Move the data to Amazon ElastiCache using AWS DMS and set up a connection within the notebook to pull data in for fast access.
Answer:

B

Discussions

Question 8

A Machine Learning Specialist is building a logistic regression model that will predict whether or not a person will order a
pizza. The Specialist is trying to build the optimal model with an ideal classification threshold.
What model evaluation technique should the Specialist use to understand how different classification thresholds will impact
the model's performance?

  • A. Receiver operating characteristic (ROC) curve
  • B. Misclassification rate
  • C. Root Mean Square Error (RMSE)
  • D. L1 norm
Answer:

A

Explanation:
Reference: https://docs.aws.amazon.com/machine-learning/latest/dg/binary-model-insights.html

Discussions

Question 9

The chief editor for a product catalog wants the research and development team to build a machine learning system that can
be used to detect whether or not individuals in a collection of images are wearing the company's retail brand. The team has
a set of training data.
Which machine learning algorithm should the researchers use that BEST meets their requirements?

  • A. Latent Dirichlet Allocation (LDA)
  • B. Recurrent neural network (RNN)
  • C. K-means
  • D. Convolutional neural network (CNN)
Answer:

D

Discussions

Question 10

A data scientist uses an Amazon SageMaker notebook instance to conduct data exploration and analysis. This requires
certain Python packages that are not natively available on Amazon SageMaker to be installed on the notebook instance.
How can a machine learning specialist ensure that required packages are automatically available on the notebook instance
for the data scientist to use?

  • A. Install AWS Systems Manager Agent on the underlying Amazon EC2 instance and use Systems Manager Automation to execute the package installation commands.
  • B. Create a Jupyter notebook file (.ipynb) with cells containing the package installation commands to execute and place the file under the /etc/init directory of each Amazon SageMaker notebook instance.
  • C. Use the conda package manager from within the Jupyter notebook console to apply the necessary conda packages to the default kernel of the notebook.
  • D. Create an Amazon SageMaker lifecycle configuration with package installation commands and assign the lifecycle configuration to the notebook instance.
Answer:

B

Explanation:
Reference: https://towardsdatascience.com/automating-aws-sagemaker-notebooks-2dec62bc2c84

Discussions
To page 2