Spaces:
Sleeping
Sleeping
Delete lapse_model.pkl
Browse files- lapse_model.pkl +0 -25
lapse_model.pkl
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
import pandas as pd
|
2 |
-
import xgboost as xgb
|
3 |
-
import pickle
|
4 |
-
|
5 |
-
# Example dummy dataset
|
6 |
-
data = {
|
7 |
-
"policy_term": [10, 15, 20],
|
8 |
-
"policy_age": [2, 5, 7],
|
9 |
-
"payment_mode_encoded": [0, 1, 2],
|
10 |
-
"communication_score": [0.3, 0.7, 0.5],
|
11 |
-
"lapse_label": [1, 0, 1]
|
12 |
-
}
|
13 |
-
df = pd.DataFrame(data)
|
14 |
-
|
15 |
-
# Split features and label
|
16 |
-
X = df[["policy_term", "policy_age", "payment_mode_encoded", "communication_score"]]
|
17 |
-
y = df["lapse_label"]
|
18 |
-
|
19 |
-
# Train model
|
20 |
-
model = xgb.XGBClassifier()
|
21 |
-
model.fit(X, y)
|
22 |
-
|
23 |
-
# Save the model
|
24 |
-
with open("lapse_model.pkl", "wb") as f:
|
25 |
-
pickle.dump(model, f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|