Customer churn is the ending of a customer's relationship with a service or company. In a data science workflow, churn commonly becomes a prediction target, such as whether an e-commerce customer will leave within the next 30 days. section 1.2.7 section 1.3.1
A churn-prediction workflow typically moves through these steps:
- Gather transaction, login, and customer information from databases, documents, webpages, or APIs. section 1.2.7 section 1.3.1
- Explore and validate the data by checking distributions, missing values, correlations, descriptive statistics, and domain consistency. section 1.2.7
- Clean the inputs and engineer features before developing the model. section 1.2.7 section 1.3.1
Predicting churn from customer data
An e-commerce dataset can combine transaction amounts and item counts with login timestamps, landing pages, age, and deactivation timestamps. Instead of passing age directly to a model, preprocessing can convert it into categories such as under 18, 18–24, 25–30, and 31–40. section 1.3.1




