Downloads · 30 days
0
asimtaseer/customer-churn-pipeline
customer-churn-pipeline is a tabular classification model from asimtaseer. Use it for the tabular classification task on the model card, and read the license before you ship it in a product. It is set up for sklearn. The card lists the license as mit.
Predict whether a customer will churn — before it's too late.
Downloads · 30 days
0
Access
Public
Updated Jun 27, 2026
Repo size
8.7 KB
Likes
0
Public
Click a slice to open those files.
.pkl8.7 KB · 61%
From the Hugging Face model README
Predict whether a customer will churn — before it's too late.
customer_churn_pipeline is a machine learning model built to predict customer churn in subscription-based or service businesses. It uses a complete scikit-learn Pipeline that handles preprocessing and classification in a single, production-ready object — making it easy to integrate directly into any Python application.
Customer churn is one of the biggest challenges companies face today. Losing a customer costs far more than retaining one. This model was built to solve that problem — giving businesses the ability to identify at-risk customers before they leave, so proactive action can be taken.
The model is packaged as a .pkl pipeline file, meaning the entire preprocessing and prediction workflow is bundled together. No separate transformation steps needed — just load and predict.
The pipeline performs the following steps end-to-end:
| Step | Description |
|---|---|
| Preprocessing | Handles missing values, scales numerical features, and encodes categorical variables |
| Feature Engineering | Prepares structured tabular customer data for model input |
| Classification | Predicts churn probability and binary outcome (Churn / No Churn) |
| Output | Returns a prediction label: 1 (Churn) or 0 (No Churn) |
Typical input features include:
pip install scikit-learn pandas joblib
Download customer_churn_pipeline.pkl from this repository.
import joblib
import pandas as pd
# Load the pipeline
pipeline = joblib.load("customer_churn_pipeline.pkl")
# Sample customer data (adjust columns to match your dataset)
sample = pd.DataFrame([{
"tenure": 12,
"MonthlyCharges": 65.5,
"TotalCharges": 786.0,
"Contract": "Month-to-month",
"PaymentMethod": "Electronic check",
"InternetService": "Fiber optic",
"TechSupport": "No",
"OnlineSecurity": "No"
}])
# Predict
prediction = pipeline.predict(sample)
print("Churn Prediction:", "Yes" if prediction[0] == 1 else "No")
proba = pipeline.predict_proba(sample)
print(f"Churn Probability: {proba[0][1] * 100:.2f}%")
.pkl file. No need to build separate transformers.| File | Description |
|---|---|
customer_churn_pipeline.pkl | The trained and serialized ML pipeline |
README.md | Documentation and usage guide |
Asim Taseer 🌐 Website: asimtaseer.unaux.com
This project is licensed under the MIT License — feel free to use, modify, and distribute with attribution.