𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Serverless Machine Learning with Amazon Redshift ML: Create, train, and deploy machine learning models using familiar SQL commands

✍ Scribed by Debu Panda, Phil Bates, Bhanu Pittampally, Sumeet Joshi


Publisher
Packt Publishing
Year
2023
Tongue
English
Leaves
290
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Supercharge and deploy Amazon Redshift Serverless, train and deploy machine learning models using Amazon Redshift ML, and run inference queries at scale

Key Features

  • Leverage supervised learning to build binary classification, multi-class classification, and regression models
  • Learn to use unsupervised learning using the K-means clustering method
  • Master the art of time series forecasting using Redshift ML
  • Purchase of the print or Kindle book includes a free PDF eBook

Book Description

Amazon Redshift Serverless enables organizations to run petabyte-scale cloud data warehouses quickly and in a cost-effective way, enabling data science professionals to efficiently deploy cloud data warehouses and leverage easy-to-use tools to train models and run predictions. This practical guide will help developers and data professionals working with Amazon Redshift data warehouses to put their SQL knowledge to work for training and deploying machine learning models.


The book begins by helping you to explore the inner workings of Redshift Serverless as well as the foundations of data analytics and types of data machine learning. With the help of step-by-step explanations of essential concepts and practical examples, you’ll then learn to build your own classification and regression models. As you advance, you’ll find out how to deploy various types of machine learning projects using familiar SQL code, before delving into Redshift ML. In the concluding chapters, you’ll discover best practices for implementing serverless architecture with Redshift.


By the end of this book, you’ll be able to configure and deploy Amazon Redshift Serverless, train and deploy machine learning models using Amazon Redshift ML, and run inference queries at scale.

What you will learn

  • Utilize Redshift Serverless for data ingestion, data analysis, and machine learning
  • Create supervised and unsupervised models and learn how to supply your own custom parameters
  • Discover how to use time series forecasting in your data warehouse
  • Create a SageMaker endpoint and use that to build a Redshift ML model for remote inference
  • Find out how to operationalize machine learning in your data warehouse
  • Use model explainability and calculate probabilities with Amazon Redshift ML

Who this book is for

Data scientists and machine learning developers working with Amazon Redshift who want to explore its machine-learning capabilities will find this definitive guide helpful. A basic understanding of machine learning techniques and working knowledge of Amazon Redshift is needed to make the most of this book.

Table of Contents

  1. Introduction to Redshift Serverless
  2. Data Loading and Analytics on Redshift Serverless
  3. Applying Machine Learning in Your Data Warehouse
  4. Leveraging Amazon Redshift Machine Learning
  5. Building Your First Machine Learning Model
  6. Building Classification Models
  7. Building Regression Models
  8. Building Unsupervised Models with K-Means Clustering
  9. Deep Learning with Redshift ML
  10. Creating Custom ML Models with XGBoost
  11. Bring Your Own Models for in Database Inference
  12. Time-Series Forecasting in your Data Warehouse
  13. Operationalizing and Optimizing Amazon Redshift ML Models

✦ Table of Contents


Cover
Title page
Copyright
Dedication
Foreword
Contributors
Table of Contents
Preface
Part 1:Redshift Overview: Getting Started with Redshift Serverless and an Introduction to Machine Learning
Chapter 1: Introduction to Amazon Redshift Serverless
What is Amazon Redshift?
Getting started with Amazon Redshift Serverless
What is a namespace?
What is a workgroup?
Connecting to your data warehouse
Using Amazon Redshift query editor v2
Loading sample data
Running your first query
Summary
Chapter 2: Data Loading and Analytics on Redshift Serverless
Technical requirements
Data loading using Amazon Redshift Query Editor v2
Creating tables
Loading data from Amazon S3
Loading data from a local drive
Data loading from Amazon S3 using the COPY command
Loading data from a Parquet file
Automating file ingestion with a COPY job
Best practices for the COPY command
Data loading using the Redshift Data API
Creating table
Loading data using the Redshift Data API
Summary
Chapter 3: Applying Machine Learning in Your Data Warehouse
Understanding the basics of ML
Comparing supervised and unsupervised learning
Classification
Regression
Traditional steps to implement ML
Data preparation
Evaluating an ML model
Overcoming the challenges of implementing ML today
Exploring the benefits of ML
Summary
Part 2:Getting Started with Redshift ML
Chapter 4: Leveraging Amazon Redshift ML
Why Amazon Redshift ML?
An introduction to Amazon Redshift ML
A CREATE MODEL overview
AUTO everything
AUTO with user guidance
XGBoost (AUTO OFF)
K-means (AUTO OFF)
BYOM
Summary
Chapter 5: Building Your First Machine Learning Model
Technical requirements
Redshift ML simple CREATE MODEL
Uploading and analyzing the data
Diving deep into the Redshift ML CREATE MODEL syntax
Creating your first machine learning model
Evaluating model performance
Checking the Redshift ML objectives
Running predictions
Comparing ground truth to predictions
Feature importance
Model performance
Summary
Chapter 6: Building Classification Models
Technical requirements
An introduction to classification algorithms
Diving into the Redshift CREATE MODEL syntax
Training a binary classification model using the XGBoost algorithm
Establishing the business problem
Uploading and analyzing the data
Using XGBoost to train a binary classification model
Running predictions
Prediction probabilities
Training a multi-class classification model using the Linear Learner model type
Using Linear Learner to predict the customer segment
Evaluating the model quality
Running prediction queries
Exploring other CREATE MODEL options
Summary
Chapter 7: Building Regression Models
Technical requirements
Introducing regression algorithms
Redshift’s CREATE MODEL with user guidance
Creating a simple linear regression model using XGBoost
Uploading and analyzing the data
Splitting data into training and validation sets
Creating a simple linear regression model
Running predictions
Creating multi-input regression models
Linear Learner algorithm
Understanding model evaluation
Prediction query
Summary
Chapter 8: Building Unsupervised Models with K-Means Clustering
Technical requirements
Grouping data through cluster analysis
Determining the optimal number of clusters
Creating a K-means ML model
Creating a model syntax overview for K-means clustering
Uploading and analyzing the data
Creating the K-means model
Evaluating the results of the K-means clustering
Summary
Part 3:Deploying Models with Redshift ML
Chapter 9: Deep Learning with Redshift ML
Technical requirements
Introduction to deep learning
Business problem
Uploading and analyzing the data
Prediction goal
Splitting data into training and test datasets
Creating a multiclass classification model using MLP
Running predictions
Summary
Chapter 10: Creating a Custom ML Model with XGBoost
Technical requirements
Introducing XGBoost
Introducing an XGBoost use case
Defining the business problem
Uploading, analyzing, and preparing data for training
Splitting data into train and test datasets
Preprocessing the input variables
Creating a model using XGBoost with Auto Off
Creating a binary classification model using XGBoost
Generating predictions and evaluating model performance
Summary
Chapter 11: Bringing Your Own Models for Database Inference
Technical requirements
Benefits of BYOM
Supported model types
Creating the BYOM local inference model
Creating a local inference model
Running local inference on Redshift
BYOM using a SageMaker endpoint for remote inference
Creating BYOM remote inference
Generating the BYOM remote inference command
Summary
Chapter 12: Time-Series Forecasting in Your Data Warehouse
Technical requirements
Forecasting and time-series data
Types of forecasting methods
What is time-series forecasting?
Time trending data
Seasonality
Structural breaks
What is Amazon Forecast?
Configuration and security
Creating forecasting models using Redshift ML
Business problem
Uploading and analyzing the data
Creating a table with output results
Summary
Chapter 13: Operationalizing and Optimizing Amazon Redshift ML Models
Technical requirements
Operationalizing your ML models
Model retraining process without versioning
The model retraining process with versioning
Automating the CREATE MODEL statement for versioning
Optimizing the Redshift models’ accuracy
Model quality
Model explainability
Probabilities
Using SageMaker Autopilot notebooks
Summary
Index
About Packt
Other Books You May Enjoy


πŸ“œ SIMILAR VOLUMES


Serverless Machine Learning with Amazon
✍ Debu Panda, Phil Bates, Bhanu Pittampally, Sumeet Joshi πŸ“‚ Library πŸ“… 2023 πŸ› Packt Publishing 🌐 English

<p><span>Supercharge and deploy Amazon Redshift Serverless, train and deploy machine learning models using Amazon Redshift ML, and run inference queries at scale</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Leverage supervised learning to build binary classification, multi-class c

Machine Learning with BigQuery ML: Creat
✍ Alessandro Marrandino πŸ“‚ Library πŸ“… 2021 πŸ› Packt Publishing 🌐 English

<p><b>Manage different business scenarios with the right machine learning technique using Google's highly scalable BigQuery ML</b></p><h4>Key Features</h4><ul><li>Gain a clear understanding of AI and machine learning services on GCP, learn when to use these, and find out how to integrate them with B

Machine Learning with BigQuery ML: Creat
✍ Alessandro Marrandino πŸ“‚ Library πŸ“… 2021 πŸ› Packt Publishing 🌐 English

<p><b>Manage different business scenarios with the right machine learning technique using Google's highly scalable BigQuery ML</b></p><h4>Key Features</h4><ul><li>Gain a clear understanding of AI and machine learning services on GCP, learn when to use these, and find out how to integrate them with B

Learn Amazon SageMaker: A guide to build
✍ Julien Simon πŸ“‚ Library πŸ“… 2020 πŸ› Packt Publishing 🌐 English

<p><b>Quickly build and deploy machine learning models without managing infrastructure, and improve productivity using Amazon SageMaker's capabilities such as Amazon SageMaker Studio, Autopilot, Experiments, Debugger, and Model Monitor</b></p> <h4>Key Features</h4> <ul><li>Build, train, and deploy m

Learn Amazon SageMaker: A guide to build
✍ Julien Simon πŸ“‚ Library πŸ“… 2021 πŸ› Packt Publishing 🌐 English

<p><b>Swiftly build and deploy machine learning models without managing infrastructure and boost productivity using the latest Amazon SageMaker capabilities such as Studio, Autopilot, Data Wrangler, Pipelines, and Feature Store</b></p><h4>Key Features</h4><ul><li>Build, train, and deploy machine lea

Learn Amazon SageMaker: A guide to build
✍ Julien Simon πŸ“‚ Library πŸ“… 2021 πŸ› Packt Publishing 🌐 English

<p><b>Swiftly build and deploy machine learning models without managing infrastructure and boost productivity using the latest Amazon SageMaker capabilities such as Studio, Autopilot, Data Wrangler, Pipelines, and Feature Store</b></p><h4>Key Features</h4><ul><li>Build, train, and deploy machine lea