Views
No views yet
clf_churn.pkl) – Binary classification (likelihood of customer churn)RegTenure.pkl) – Regression (expected number of months a customer stays)reg_ltv.pkl) – Regression (predicted total value of a customer)pickle module and can be loaded easily for inference.| Model File | Task | Type |
|---|---|---|
clf_churn.pkl | Churn Prediction | Classification |
RegTenure.pkl | Tenure Estimation | Regression |
reg_ltv.pkl | LTV Prediction | Regression |
1pip install catboost pandas
2
3
4import pickle
5
6with open("clf_churn.pkl", "rb") as f:
7 clf_cb = pickle.load(f)
8
9with open("RegTenure.pkl", "rb") as f:
10 reg_tenure_cb = pickle.load(f)
11
12with open("reg_ltv.pkl", "rb") as f:
13 reg_ltv_cb = pickle.load(f)
14
15
16# Predict churn probability
17churn_proba = clf_cb.predict_proba(X_test)[:, 1]
18
19# Predict tenure
20tenure_pred = reg_tenure_cb.predict(X_test)
21
22# Predict lifetime value
23ltv_pred = reg_ltv_cb.predict(X_test)
24
25print("🔁 Churn:", churn_proba[:5])
26print("📅 Tenure:", tenure_pred[:5])
27print("💰 LTV:", ltv_pred[:5])