deva8217 commited on
Commit
3a2be19
·
verified ·
1 Parent(s): 2bd7c5b

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +2 -47
README.md CHANGED
@@ -1,50 +1,5 @@
1
- ---
2
- library_name: scikit-learn
3
- license: other
4
- language: en
5
- tags: [tabular, classification, random-forest, tourism]
6
- datasets: [deva8217/tourism-wellness]
7
- ---
8
-
9
  # Wellness Tourism Purchase Model
10
 
11
- **Best model:** RandomForest
12
- **Validation F1:** 0.7429
13
-
14
- **Test metrics**
15
- - ROC-AUC: 0.9482
16
- - AUPRC: 0.8454
17
- - Accuracy: 0.9068
18
- - Precision: 0.7440
19
- - Recall: 0.7862
20
- - F1: 0.7646
21
- **Threshold:** 0.32
22
-
23
- ## How to use
24
- ```python
25
- from huggingface_hub import hf_hub_download
26
- import joblib, pandas as pd
27
-
28
- # download model artifact
29
- p = hf_hub_download("deva8217/tourism-wellness-model", "best_model.joblib")
30
- model = joblib.load(p)
31
-
32
- # df must contain the same training columns (names & dtypes)
33
- df = pd.DataFrame([{
34
- "Age": 44, "CityTier": 1, "Passport": 1, "OwnCar": 1,
35
- "TypeofContact": "Company Invited", "Occupation": "Salaried",
36
- "Gender": "Male", "NumberOfPersonVisiting": 4, "PreferredPropertyStar": 5,
37
- "MaritalStatus": "Married", "NumberOfTrips": 2, "NumberOfFollowups": 2,
38
- "Designation": "Executive", "MonthlyIncome": 50000,
39
- "PitchSatisfactionScore": 7, "ProductPitched": "Basic",
40
- "DurationOfPitch": 30, "NumberOfChildrenVisiting": 0
41
- }])
42
-
43
- proba = model.predict_proba(df)[:, 1][0]
44
- print("purchase_probability:", round(float(proba), 4))
45
-
46
- # Wellness Tourism Purchase Model
47
  Best model: **RandomForest**
48
- Validation F1: **0.7429**
49
- Test metrics: {"roc_auc": 0.9482475743260445, "auprc": 0.8453597025735655, "accuracy": 0.9067796610169492, "precision": 0.7440476190476191, "recall": 0.7861635220125787, "f1": 0.764525993883792}
50
- Threshold: **0.32**
 
 
 
 
 
 
 
 
 
1
  # Wellness Tourism Purchase Model
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  Best model: **RandomForest**
4
+ Test metrics: {"roc_auc": 0.9390964894911036, "auprc": 0.8021290736713121, "accuracy": 0.8995157384987893, "precision": 0.7065217391304348, "recall": 0.8176100628930818, "f1": 0.7580174927113703, "threshold": 0.3497817045767868}
5
+ Threshold: **0.35**