File size: 1,465 Bytes
487ec3c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# 🐱 CatBoost Models for Churn, Tenure, and LTV Prediction

This repository contains three CatBoost models trained to predict:

- **Churn** (`clf_churn.pkl`) – Binary classification (likelihood of customer churn)
- **Tenure** (`RegTenure.pkl`) – Regression (expected number of months a customer stays)
- **Lifetime Value (LTV)** (`reg_ltv.pkl`) – Regression (predicted total value of a customer)

Each model is saved using Python's `pickle` module and can be loaded easily for inference.

---

## 🧠 Model Overview

| Model File        | Task               | Type           |
|-------------------|--------------------|----------------|
| `clf_churn.pkl`   | Churn Prediction    | Classification |
| `RegTenure.pkl`   | Tenure Estimation   | Regression     |
| `reg_ltv.pkl`     | LTV Prediction      | Regression     |

---

## πŸ’Ύ How to Use

### 1. Install Requirements

```bash
pip install catboost pandas


import pickle

with open("clf_churn.pkl", "rb") as f:
    clf_cb = pickle.load(f)

with open("RegTenure.pkl", "rb") as f:
    reg_tenure_cb = pickle.load(f)

with open("reg_ltv.pkl", "rb") as f:
    reg_ltv_cb = pickle.load(f)


# Predict churn probability
churn_proba = clf_cb.predict_proba(X_test)[:, 1]

# Predict tenure
tenure_pred = reg_tenure_cb.predict(X_test)

# Predict lifetime value
ltv_pred = reg_ltv_cb.predict(X_test)

print("πŸ” Churn:", churn_proba[:5])
print("πŸ“… Tenure:", tenure_pred[:5])
print("πŸ’° LTV:", ltv_pred[:5])