Deploying an ML pipeline for customer churn
For our practical example, we’ll use the telecommunication (telco) Customer Churn dataset we worked with in Chapter 5, LightGBM Parameter Optimization with Optuna. The dataset consists of descriptive information for each customer (such as gender, billing information, and charges) and whether the customer has left the telco provider (churn is yes or no). Our task is to build a classification model to predict churn.
Further, we’d like to deploy the model behind a REST API such that it can be integrated into a more extensive software system. The REST API should have an endpoint that makes predictions for data passed to the API.
We’ll use FastAPI, a modern, high-performance Python web framework, to build our API. Finally, we’ll deploy our model and API to Google Cloud Platform using Docker.
Building an ML pipeline using scikit-learn
We will start by building an ML pipeline using scikit-learn’s Pipeline...