AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021)

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) delivers all the key information you need, including topic summaries, question banks, and study tips to ace your exam.

Amelia Ward
Contributor
4.8
50
10 months ago
Preview (16 of 338 Pages)
100%
Log in to unlock

Page 1

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) - Page 1 preview image

Loading page ...

Page 2

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) - Page 2 preview image

Loading page ...

Page 3

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) - Page 3 preview image

Loading page ...

AWS CertifiedMachine LearningSpecialty: MLS-C01Certification GuideThe definitive guide to passing the MLS-C01 exam onthe very first attemptSomanath NandaWeslley MouraBIRMINGHAM—MUMBAI

Page 4

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) - Page 4 preview image

Loading page ...

AWS Certified Machine Learning Specialty:MLS-C01 Certification GuideCopyright © 2021 Packt PublishingAll rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted inany form or by any means, without the prior written permission of the publisher, except in the case of briefquotations embedded in critical articles or reviews.Every effort has been made in the preparation of this book to ensure the accuracy of the information presented.However, the information contained in this book is sold without warranty, either express or implied. Neitherthe authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages causedor alleged to have been caused directly or indirectly by this book.Packt Publishing has endeavored to provide trademark information about all of the companies and productsmentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee theaccuracy of this information.Group Product Manager: Kunal ParikhPublishing Product Manager: Aditi GourSenior Editor: David SugarmanContent Development Editor: Joseph SunilTechnical Editor: Arjun VarmaCopy Editor: Safis EditingProject Coordinator: Aparna NairProofreader: Safis EditingIndexer: Rekha NairProduction Designer: Vijay KambleFirst published: March 2021Production reference: 1180321Published by Packt Publishing Ltd.Livery Place35 Livery StreetBirminghamB3 2PB, UK.ISBN 978-1-80056-900-3www.packt.com

Page 5

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) - Page 5 preview image

Loading page ...

ContributorsAbout the authorsSomanath Nandahas 10 years of working experience in the IT industry, which includesprod development, DevOps, and designing and architecting products from end to end.He has also worked at AWS as a big data engineer for about 2 years.WeslleyMourahas 17 years of working experience in information technology (the last 9years working on data teams and the last 5 years working as a lead data scientist).He has worked in a variety of industries, such as financial, telecommunications,healthcare, and logistics. In 2019, he was a nominee for data scientist of the year at theEuropean DatSci & AI Awards.

Page 6

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) - Page 6 preview image

Loading page ...

About the reviewerArunabh Sahaiis a results-oriented leader who has been delivering technologysolutions for more than 16 years across multiple industries around the globe. He is alsoa forward-thinking technology enthusiast and a technology coach, helping learners topolish their technology skills. Arunabh holds a master's degree in computer science andhas in-depth knowledge of cloud (AWS/Azure/GCP) technologies. He holds multiplecertifications attesting to his cloud technology knowledge and experience. He is alsopassionate about intelligent automation using predictive analytics. You can connect withhim on his LinkedIn, and he will be happy to help you with your technology questions.

Page 7

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) - Page 7 preview image

Loading page ...

PrefaceSection 1:Introduction to Machine Learning1Machine Learning FundamentalsComparing AI, ML, and DL4Examining ML5Examining DL6Classifying supervised,unsupervised, andreinforcement learning6Introducing supervised learning6The CRISP-DM modelinglife cycle9Data splitting12Overfitting and underfitting14Applying cross-validation andmeasuring overfitting14Bootstrapping methods16The variance versus bias trade-off17Shuffling your training set18Modeling expectations18Introducing ML frameworks19ML in the cloud21Summary22Questions222AWS Application Services for AI/MLTechnical requirements30Analyzing images and videoswith Amazon Rekognition30Exploring the benefits of AmazonRekognition31Getting hands-on with AmazonRekognition32Text to speech with AmazonPolly38Table of Contents

Page 8

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) - Page 8 preview image

Loading page ...

ii Table of ContentsExploring the benefits of Amazon Polly39Getting hands-on with Amazon Polly40Speech to text with AmazonTranscribe45Exploring the benefits of AmazonTranscribe46Getting hands-on with AmazonTranscribe46Implementing natural languageprocessing with AmazonComprehend49Exploring the benefits of AmazonComprehend50Getting hands-on with AmazonComprehend51Translating documents withAmazon Translate54Exploring the benefits ofAmazon Translate54Getting hands-on withAmazon Translate55Extracting text from documentswith Amazon Textract58Exploring the benefits ofAmazon Textract59Getting hands-on withAmazon Textract60Creating chatbots on AmazonLex65Exploring the benefits of Amazon Lex65Getting hands-on with Amazon Lex66Summary69Questions69Answers72Section 2:Data Engineering and Exploratory DataAnalysis3Data Preparation and TransformationIdentifying types of features76Dealing with categoricalfeatures78Transforming nominal features78Applying binary encoding80Transforming ordinal features81Avoiding confusion in our train andtest datasets81Dealing with numericalfeatures83Data normalization84Data standardization86Applying binning and discretization87Applying other types of numericaltransformations89Understanding datadistributions93Handling missing values94Dealing with outliers98

Page 9

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) - Page 9 preview image

Loading page ...

Table of Contents iiiDealing with unbalanceddatasets101Dealing with text data103Bag of words104TF-IDF107Word embedding108Summary112Questions1134Understanding and Visualizing DataVisualizing relationships inyour data124Visualizing comparisons inyour data126Visualizing distributions inyour data130Visualizing compositions inyour data133Building key performanceindicators134Introducing Quick Sight135Summary137Questions1385AWS Services for Data StoringTechnical requirements146Storing data on Amazon S3146Creating buckets to hold data149Distinguishing between object tagsand object metadata152Controlling access to bucketsand objects on Amazon S3153S3 bucket policy153Protecting data on Amazon S3156Applying bucket versioning156Applying encryption to buckets157Securing S3 objects at restand in transit162Using other types ofdata stores164Relational DatabaseServices (RDSes)165Managing failover inAmazon RDS166Taking automatic backup,RDS snapshots, and restoreand read replicas168Writing to Amazon Aurorawith multi-master capabilities170Storing columnar data onAmazon Redshift171Amazon DynamoDB forNoSQL database as a service171Summary172Questions172Answers176

Page 10

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) - Page 10 preview image

Loading page ...

iv Table of Contents6AWS Services for Data ProcessingTechnical requirements178Creating ETL jobs on AWS Glue178Features of AWS Glue179Getting hands-on with AWS Glue datacatalog components180Getting hands-on with AWS Glue ETLcomponents186Querying S3 data using Athena188Processing real-time data usingKinesis data streams190Storing and transformingreal-time data using KinesisData Firehose192Different ways of ingestingdata from on-premisesinto AWS192AWS Storage Gateway193Snowball, Snowball Edge, andSnowmobile194AWS DataSync195Processing stored dataon AWS195AWS EMR196AWS Batch197Summary198Questions198Answers201Section 3:Data Modeling7Applying Machine Learning AlgorithmsIntroducing this chapter206Storing the training data208A word about ensemblemodels209Supervised learning210Working with regression models210Working with classification models221Forecasting models224Object2Vec229Unsupervised learning230Clustering230Anomaly detection239Dimensionality reduction239IP Insights241Textual analysis242Blazing Text algorithm242Sequence-to-sequence algorithm243Neural Topic Model (NTM) algorithm243Image processing244Image classification algorithm244

Page 11

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) - Page 11 preview image

Loading page ...

Table of Contents vSemantic segmentation algorithm244Object detection algorithm245Summary245Questions2478Evaluating and Optimizing ModelsIntroducing model evaluation254Evaluating classificationmodels255Extracting metrics froma confusion matrix256Summarizing precision and recall259Evaluating regression models259Exploring other regression metrics261Model optimization261Grid search262Summary264Questions2659Amazon SageMaker ModelingTechnical requirements272Creating notebooks inAmazon SageMaker272What is Amazon SageMaker?272Getting hands-on with AmazonSageMaker notebook instances276Getting hands-on with AmazonSageMaker's training and inferenceinstances279Model tuning282Tracking your training jobsand selecting the best model287Choosing instance types inAmazon SageMaker288Choosing the right instance typefor a training job290Choosing the right instance type for aninference job290Securing SageMakernotebooks291Creating alternative pipelineswith Lambda Functions292Creating and configuring a LambdaFunction294Completing your configurations anddeploying a Lambda Function296Working with Step Functions300Summary302Questions303Answers305Why subscribe?307Other Books You May EnjoyIndex

Page 12

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) - Page 12 preview image

Loading page ...

Page 13

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) - Page 13 preview image

Loading page ...

PrefaceThe AWS Machine Learning Specialty certification exam tests your competency toperformmachinelearning(ML) on AWS infrastructure. This book covers the entireexam syllabus in depth using practical examples to help you with your real-world machinelearning projects on AWS.Starting with an introduction to machine learning on AWS, you'll learn the fundamentalsof machine learning and explore important AWS services forartificial intelligence(AI).You'll then see how to prepare data for machine learning and discover different techniquesfor data manipulation and transformation for different types of variables. The book alsocovers the handling of missing data and outliers and takes you through various machinelearning tasks such as classification, regression, clustering, forecasting, anomaly detection,text mining, and image processing, along with their specific ML algorithms, that youshould know to pass the exam. Finally, you'll explore model evaluation, optimization, anddeployment and get to grips with deploying models in a production environment andmonitoring them.By the end of the book, you'll have gained knowledge of all the key fields of machinelearning and the solutions that AWS has released for each of them, along with the tools,methods, and techniques commonly used in each domain of AWS machine learning.Who this book is forThis book is for professionals and students who want to take and pass the AWS MachineLearning Specialty exam or gain a deeper knowledge of machine learning with a specialfocus on AWS. Familiarity with the basics of machine learning and AWS services isnecessary.What this book coversChapter 1,Machine Learning Fundamentals, covers some machine learning definitions,different types of modeling approaches, and all the steps necessary to build a machinelearning product, known as the modeling pipeline.

Page 14

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) - Page 14 preview image

Loading page ...

viiiPrefaceChapter 2,AWS Application Services for AI/ML, covers details of the various AI/MLapplications offered by AWS, which you should know to pass the exam.Chapter 3,Data Preparation and Transformation, deals with categorical and numericalfeatures, applying different techniques to transform your data, such as one-hot encoding,binary encoding, ordinal encoding, binning, and text transformations. You will also learnhow to handle missing values and outliers on your data, two important topics to buildgood machine learning models.Chapter 4,Understanding and Visualizing Data, teaches you how to select the mostappropriate data visualization technique according to different variable types and businessneeds. You will also learn about available AWS services for visualizing data.Chapter 5,AWS Services for Data Storing, teaches you about AWS services used to storedata for machine learning. You will learn about the many different S3 storage classes andwhen to use each of them. You will also learn how to handle data encryption and how tosecure your data at rest and in transit. Finally, we will present other types of data storeservices, still worth knowing for the exam.Chapter 6,AWS Services for Processing, teaches you about AWS services used to processdata for machine learning. You will learn how to deal with batch and real-time processing,how to directly query data on Amazon S3, and how to create big data applications on EMR.Chapter 7,Applying Machine Learning Algorithms, covers different types of machinelearning tasks, such as classification, regression, clustering, forecasting, anomaly detection,text mining, and image processing. Each of these tasks has specific algorithms that youshould know about to pass the exam. You will also learn how ensemble models work andhow to deal with the curse of dimensionality.Chapter 8,Evaluating and Optimizing Models, teaches you how to select model metricsto evaluate model results. You will also learn how to optimize your model by tuningits hyperparameters.Chapter 9,Amazon SageMaker Modeling, teaches you how to spin up notebooks to workwith exploratory data analysis and how to train your models on Amazon SageMaker. Youwill learn where and how your training data should be stored in order to be accessiblethrough SageMaker and the different data formats that you can use.

Page 15

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) - Page 15 preview image

Loading page ...

PrefaceixTo get the most out of this bookYou will need a system with a good internet connection and an AWS account.If you are using the digital version of this book, we advise you to type the code yourselfor access the code via the GitHub repository (link available in the next section). Doingso will help you avoid any potential errors related to the copying and pasting of code.Download the example code filesYou can download the example code files for this book from GitHub athttps://github.com/PacktPublishing/AWS-Certified-Machine-Learning-Specialty-MLS-C01-Certification-Guide. In case there's an update to thecode, it will be updated on the existing GitHub repository.We also have other code bundles from our rich catalog of books and videos available athttps://github.com/PacktPublishing/. Check them out!Download the color imagesWe also provide a PDF file that has color images of the screenshots/diagrams usedin this book. You can download it here:https://static.packt-cdn.com/downloads/9781800569003_ColorImages.pdf.Conventions usedThere are a number of text conventions used throughout this book.Code in text: Indicates code words in text, database table names, folder names,filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles.Here is an example: To check each of the versions and the latest one of them we use awss3api list-object-versions --bucket version-demo-mlpractice to which S3 provides thelist-object-versions API, as shown here."A block of code is set as follows:"Versions": [{"ETag":"\"b6690f56ca22c410a2782512d24cdc97\"","Size": 10,"StorageClass": "STANDARD",

Page 16

AWS Certified Machine Learning Specialty: MLS-C01 Certification Guide (2021) - Page 16 preview image

Loading page ...

xPreface"Key": "version-doc.txt","VersionId":"70wbLG6BMBEQhCXmwsriDgQoXafFmgGi","IsLatest": true,"LastModified": "2020-11-07T15:57:05+00:00","Owner": {"DisplayName": "baba","ID": "XXXXXXXXXXXX"}} ]When we wish to draw your attention to a particular part of a code block, the relevantlines or items are set in bold:[default]exten => s,1,Dial(Zap/1|30)exten => s,2,Voicemail(u100)exten => s,102,Voicemail(b100)exten => i,1,Voicemail(s0)Any command-line input or output is written as follows:$aws s3 ls s3://version-demo-mlpractice/$echo "Version-2">version-doc.txtBold: Indicates a new term, an important word, or words that you see onscreen. Forexample, words in menus or dialog boxes appear in the text like this. Here is an example:"SelectSystem infofrom theAdministrationpanel."Tips or important notesAppear like this.Get in touchFeedback from our readers is always welcome.General feedback: If you have questions about any aspect of this book, mention the booktitle in the subject of your message and email us atcustomercare@packtpub.com.
Preview Mode

This document has 338 pages. Sign in to access the full document!