Reader small image

You're reading from  Serverless Machine Learning with Amazon Redshift ML

Product typeBook
Published inAug 2023
Reading LevelBeginner
PublisherPackt
ISBN-139781804619285
Edition1st Edition
Languages
Right arrow
Authors (4):
Debu Panda
Debu Panda
author image
Debu Panda

Debu Panda, a Senior Manager, Product Management at AWS, is an industry leader in analytics, application platform, and database technologies, and has more than 25 years of experience in the IT world. Debu has published numerous articles on analytics, enterprise Java, and databases and has presented at multiple conferences such as re:Invent, Oracle Open World, and Java One. He is lead author of the EJB 3 in Action (Manning Publications 2007, 2014) and Middleware Management (Packt, 2009).
Read more about Debu Panda

Phil Bates
Phil Bates
author image
Phil Bates

Phil Bates is a Senior Analytics Specialist Solutions Architect at AWS. He has more than 25 years of experience implementing large-scale data warehouse solutions. He is passionate about helping customers through their cloud journey and leveraging the power of ML within their data warehouse.
Read more about Phil Bates

Bhanu Pittampally
Bhanu Pittampally
author image
Bhanu Pittampally

Bhanu Pittampally is Analytics Specialist Solutions Architect at Amazon Web Services. His background is in data and analytics and is in the field for over 16 years. He currently lives in Frisco, TX with his wife Kavitha and daughters Vibha and Medha.
Read more about Bhanu Pittampally

Sumeet Joshi
Sumeet Joshi
author image
Sumeet Joshi

Sumeet Joshi is an Analytics Specialist Solutions Architect based out of New York. He specializes in building large-scale data warehousing solutions. He has over 17 years of experience in the data warehousing and analytical space.
Read more about Sumeet Joshi

View More author details
Right arrow

Model performance

Let’s use Redshift SQL to compute a confusion matrix to evaluate the performance of the classification model. Using a confusion matrix, you can identify true positives, true negatives, false positives, and false negatives, based on which various statistical measures such as accuracy, precision, recall, sensitivity, specificity, and finally, F1 score are calculated. You can read more about the concept of the confusion matrix here: https://en.wikipedia.org/wiki/Confusion_matrix.

The following query uses a WITH clause, which implements a common table expression in Redshift. This query has the following three parts:

  • The first part is about the SELECT statement within the WITH clause, where we predict customer churn and save it in memory. This dataset is named infer_data.
  • The second part, which is below the first SELECT statement, reads infer_data and builds the confusion matrix, and these details are stored in memory in a dataset called confusionmatrix...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Serverless Machine Learning with Amazon Redshift ML
Published in: Aug 2023Publisher: PacktISBN-13: 9781804619285

Authors (4)

author image
Debu Panda

Debu Panda, a Senior Manager, Product Management at AWS, is an industry leader in analytics, application platform, and database technologies, and has more than 25 years of experience in the IT world. Debu has published numerous articles on analytics, enterprise Java, and databases and has presented at multiple conferences such as re:Invent, Oracle Open World, and Java One. He is lead author of the EJB 3 in Action (Manning Publications 2007, 2014) and Middleware Management (Packt, 2009).
Read more about Debu Panda

author image
Phil Bates

Phil Bates is a Senior Analytics Specialist Solutions Architect at AWS. He has more than 25 years of experience implementing large-scale data warehouse solutions. He is passionate about helping customers through their cloud journey and leveraging the power of ML within their data warehouse.
Read more about Phil Bates

author image
Bhanu Pittampally

Bhanu Pittampally is Analytics Specialist Solutions Architect at Amazon Web Services. His background is in data and analytics and is in the field for over 16 years. He currently lives in Frisco, TX with his wife Kavitha and daughters Vibha and Medha.
Read more about Bhanu Pittampally

author image
Sumeet Joshi

Sumeet Joshi is an Analytics Specialist Solutions Architect based out of New York. He specializes in building large-scale data warehousing solutions. He has over 17 years of experience in the data warehousing and analytical space.
Read more about Sumeet Joshi