mjpsm commited on
Commit
ab9a564
·
verified ·
1 Parent(s): 277a447

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +61 -0
README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ library_name: xgboost
4
+ tags:
5
+ - regression
6
+ - soulprint
7
+ - ayo
8
+ - xgboost
9
+ datasets:
10
+ - custom
11
+ metrics:
12
+ - mse
13
+ - r2
14
+ model_name: Ayo XGB Soulprint Model
15
+ model_file: Ayo_xgb_model.json
16
+ license: mit
17
+ ---
18
+
19
+ # Ayo Soulprint Regression Model
20
+
21
+ ## Model Details
22
+ - **Type:** XGBoost Regressor
23
+ - **Embeddings:** all-mpnet-base-v2 (SentenceTransformer)
24
+ - **Trained on:** Ayo Soulprint dataset (~1,100 rows, balanced bins)
25
+ - **Target:** Continuous score from 0.00 → 1.00
26
+
27
+ ## Performance
28
+ - **MSE:** 0.0154
29
+ - **R²:** 0.801
30
+
31
+ ## Usage
32
+ ```python
33
+ import xgboost as xgb
34
+ from sentence_transformers import SentenceTransformer
35
+ from huggingface_hub import hf_hub_download
36
+
37
+ # -----------------------------
38
+ # 1. Download model from Hugging Face Hub
39
+ # -----------------------------
40
+ REPO_ID = "mjpsm/Ayo-xgb-model"
41
+ FILENAME = "Ayo_xgb_model.json"
42
+
43
+ model_path = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
44
+
45
+ # -----------------------------
46
+ # 2. Load model + embedder
47
+ # -----------------------------
48
+ model = xgb.XGBRegressor()
49
+ model.load_model(model_path)
50
+
51
+ embedder = SentenceTransformer("all-mpnet-base-v2")
52
+
53
+ # -----------------------------
54
+ # 3. Example prediction
55
+ # -----------------------------
56
+ text = "The crowd cheered loudly as the drums pounded."
57
+ embedding = embedder.encode([text])
58
+ score = model.predict(embedding)[0]
59
+
60
+ print("Predicted Ayo Score:", round(float(score), 3))
61
+ ```