Skip to Content
Low-Code AI
book

Low-Code AI

by Gwendolyn Stripling, Michael Abel
September 2023
Intermediate to advanced content levelIntermediate to advanced
328 pages
8h 47m
English
O'Reilly Media, Inc.
Book available
Content preview from Low-Code AI

Chapter 7. Training Custom ML Models in Python

In this chapter, you’ll learn how to build classification models to predict customer churn using two popular ML libraries available in Python, scikit-learn and Keras. First, you’ll explore and clean your data using Pandas. Then you’ll learn how to use scikit-learn to prepare categorical features for training using one-hot encoding, train a logistic regression model, understand model performance using evaluation metrics, and improve model performance. You’ll learn how to perform the same steps using Keras to build a neural network classification model using the already prepared data. Along the way, you’ll learn more about performance metrics for classification models and how to better understand a confusion matrix to better evaluate your classification models.

The dataset being used for this chapter, the IBM Telco Customer Churn dataset, is a popular dataset for learning how to model customer churn. You should feel encouraged to look at other examples of how to work with this dataset to grow your knowledge after completing the exercises in this chapter.

The Business Use Case: Customer Churn Prediction

Your goal in this project will be to predict customer churn for a telecommunications company. Customer churn is defined as the attrition rate for customers, or in other words the rate of customers that choose to stop using services. Telecommunications companies often sell their products at a monthly rate or via annual contracts, so ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

AI at the Edge

AI at the Edge

Daniel Situnayake, Jenny Plunkett
FastAPI

FastAPI

Bill Lubanovic
Interpretable AI

Interpretable AI

Ajay Thampi

Publisher Resources

ISBN: 9781098146818Errata PageSupplemental Content