Price Increase Churn Prediction Model
Problem
Predict whether a subscription customer will cancel within 90 days after a price increase.
Model Architecture
- Algorithm: XGBoost Gradient Boosted Trees
- Type: Binary Classification (Stay vs Churn)
- Target:
Churnwithin 90-day window after price increase
Dataset
- Source:
aai510-group1/telco-customer-churn(IBM Telco Customer Churn) - Size: 7,043 customers
- Churn Rate: 26.5%
Feature Engineering
Core Features (mapped from your data)
| Your Column | Engineered Features |
|---|---|
tenure |
tenure, tenure_log, tenure_squared, tenure_group |
days_left_in_contract |
days_left_in_contract, contract_ending_soon, is_month_to_month |
rmr (Monthly Charge) |
rmr, rmr_log, rmr_per_tenure_month, new_monthly_charge, monthly_increase_amount |
annual_services |
num_services, service_diversity, rmr_per_service |
last_appointment_date |
satisfaction_score, churn_risk_score, low_satisfaction |
added_date |
age_group, cohort proxies |
Price-Increase-Specific Features
price_increase_pctβ configurable (default 15%)new_monthly_chargeβ post-increase monthly costmonthly_increase_amountβ absolute dollar increaseprice_to_cltv_ratioβ price burden relative to lifetime valueprice_increase_burdenβ increase relative to historical spend- Interaction terms:
tenure Γ price_increase,contract_ending Γ price_increase,low_satisfaction Γ price_increase
RFM-Style Features
recency_scoreβ from satisfaction (lower = higher recency)frequency_scoreβ from service count quintilesmonetary_scoreβ from total revenue quintilesrfm_scoreβ combined RFM score
Performance
| Metric | Value |
|---|---|
| AUC-ROC | 0.9987 |
| Average Precision | 0.9968 |
| Precision | 0.9733 |
| Recall | 0.9759 |
| F1 Score | 0.9746 |
Files
| File | Purpose |
|---|---|
train.py |
Main training script |
predict.py |
Inference script with sample data |
model.py |
Model class with evaluation |
features.py |
Feature engineering pipeline |
data_loader.py |
Dataset loading |
config.py |
Hyperparameters |
price_increase_churn_model.pkl |
Saved model artifact |
Usage
Training
cd /app/price_increase_model
python train.py
Inference
from predict import predict_churn_risk
import pandas as pd
# Your customer data
customers = pd.DataFrame({...})
results = predict_churn_risk(customers,
model_path='price_increase_churn_model.pkl',
price_increase_pct=0.15)
print(results)
Risk Tiers
| Probability | Tier | Action |
|---|---|---|
| β₯ 0.70 | High Risk | Immediate retention outreach |
| 0.40 - 0.70 | Medium Risk | Targeted offer / discount |
| < 0.40 | Low Risk | Standard communication |
How to Adapt to Your Data
- Map your columns to the feature engineer in
features.py - Set your price increase % in
config.pyor pass to inference - Add your actual price increase date to compute
days_since_price_increase - Replace
Churntarget with your actual 90-day cancellation flag - Retrain on your historical data
Business Impact
This model enables:
- Proactive retention: Identify at-risk customers before they churn
- Targeted discounts: Offer retention incentives only to high-risk customers
- Price optimization: Simulate churn impact at different increase levels
- CLV protection: Prioritize retention of high-value at-risk customers
Generated by ML Intern
This model repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.
- Try ML Intern: https://smolagents-ml-intern.hf.space
- Source code: https://github.com/huggingface/ml-intern
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support