CoolFace
Modelpublic

Devdit/Datathon_CatBoost

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
README.md55 linesDownload Raw Back to root
1# ๐Ÿฑ CatBoost Models for Churn, Tenure, and LTV Prediction2 3This repository contains three CatBoost models trained to predict:4 5- **Churn** (`clf_churn.pkl`) โ€“ Binary classification (likelihood of customer churn)6- **Tenure** (`RegTenure.pkl`) โ€“ Regression (expected number of months a customer stays)7- **Lifetime Value (LTV)** (`reg_ltv.pkl`) โ€“ Regression (predicted total value of a customer)8 9Each model is saved using Python's `pickle` module and can be loaded easily for inference.10 11---12 13## ๐Ÿง  Model Overview14 15| Model File        | Task               | Type           |16|-------------------|--------------------|----------------|17| `clf_churn.pkl`   | Churn Prediction    | Classification |18| `RegTenure.pkl`   | Tenure Estimation   | Regression     |19| `reg_ltv.pkl`     | LTV Prediction      | Regression     |20 21---22 23## ๐Ÿ’พ How to Use24 25### 1. Install Requirements26 27```bash28pip install catboost pandas29 30 31import pickle32 33with open("clf_churn.pkl", "rb") as f:34    clf_cb = pickle.load(f)35 36with open("RegTenure.pkl", "rb") as f:37    reg_tenure_cb = pickle.load(f)38 39with open("reg_ltv.pkl", "rb") as f:40    reg_ltv_cb = pickle.load(f)41 42 43# Predict churn probability44churn_proba = clf_cb.predict_proba(X_test)[:, 1]45 46# Predict tenure47tenure_pred = reg_tenure_cb.predict(X_test)48 49# Predict lifetime value50ltv_pred = reg_ltv_cb.predict(X_test)51 52print("๐Ÿ” Churn:", churn_proba[:5])53print("๐Ÿ“… Tenure:", tenure_pred[:5])54print("๐Ÿ’ฐ LTV:", ltv_pred[:5])55