Book Image

Mastering Machine Learning on AWS

By : Dr. Saket S.R. Mengle, Maximo Gurmendez
Book Image

Mastering Machine Learning on AWS

By: Dr. Saket S.R. Mengle, Maximo Gurmendez

Overview of this book

Amazon Web Services (AWS) is constantly driving new innovations that empower data scientists to explore a variety of machine learning (ML) cloud services. This book is your comprehensive reference for learning and implementing advanced ML algorithms in AWS cloud. As you go through the chapters, you’ll gain insights into how these algorithms can be trained, tuned, and deployed in AWS using Apache Spark on Elastic Map Reduce (EMR), SageMaker, and TensorFlow. While you focus on algorithms such as XGBoost, linear models, factorization machines, and deep nets, the book will also provide you with an overview of AWS as well as detailed practical applications that will help you solve real-world problems. Every application includes a series of companion notebooks with all the necessary code to run on AWS. In the next few chapters, you will learn to use SageMaker and EMR Notebooks to perform a range of tasks, right from smart analytics and predictive modeling through to sentiment analysis. By the end of this book, you will be equipped with the skills you need to effectively handle machine learning projects and implement and evaluate algorithms on AWS.
Table of Contents (24 chapters)
Free Chapter
1
Section 1: Machine Learning on AWS
3
Section 2: Implementing Machine Learning Algorithms at Scale on AWS
9
Section 3: Deep Learning
13
Section 4: Integrating Ready-Made AWS Machine Learning Services
17
Section 5: Optimizing and Deploying Models through AWS
Appendix: Getting Started with AWS

SageMaker model deployment

In Chapter 2, Classifying Twitter Feeds with Naive Bayes, we deployed our first model with SageMaker. At that point, we had trained our classifier using BlazingText and stored it in a variable called bt_model. To deploy the model, we just need to call the deploy method, stating the number and kinds of machines to use:

bt_model.deploy(initial_instance_count = 1,instance_type = 'ml.m4.xlarge')

SageMaker can balance the requests made to the endpoint across the number of instances and automatically scale up or down the depending on the service load. Details can be found at https://docs.aws.amazon.com/sagemaker/latest/dg/endpoint-auto-scaling.html.

Once we invoke the deploy method, an endpoint should appear in the AWS SageMaker console at https://console.aws.amazon.com/sagemaker. The following screenshot shows the endpoint for our BlazingText...