Views
No views yet
Low, Medium, or High — from eight 1–10 numeric features.xgb_model_Skill_Level_v2.json — trained XGBoost modelfeature_order_Skill_Level_v2.json — list of feature names (order-sensitive)label_map_Skill_Level_v2.json — mapping from class name → index (don’t assume order)years_experience_scoreeducation_training_scoreexecution_ability_scoreproblem_solving_scoreconfidence_scoreidea_difficulty_scoreleadership_scorenetworking_scoreNote: The dataset also contains askill_level_readiness(1–10) field, but it is not used as an input in this v2 model to avoid target leakage.
1# pip install xgboost pandas huggingface_hub
2
3from huggingface_hub import hf_hub_download
4from xgboost import XGBClassifier
5import json, pandas as pd, numpy as np
6
7REPO_ID = "mjpsm/Skill-Level-XGB-v2" # change to your repo id if you fork
8
9# Download artifacts
10model_file = hf_hub_download(REPO_ID, "xgb_model_Skill_Level_v2.json")
11features_file = hf_hub_download(REPO_ID, "feature_order_Skill_Level_v2.json")
12labelmap_file = hf_hub_download(REPO_ID, "label_map_Skill_Level_v2.json")
13
14with open(features_file) as f: FEATURE_COLS = json.load(f)
15with open(labelmap_file) as f: LABEL_MAP = json.load(f) # e.g., {"High":0,"Low":1,"Medium":2}
16INV = {v:k for k,v in LABEL_MAP.items()}
17
18# Load model
19clf = XGBClassifier()
20clf.load_model(model_file)
21
22# Single example
23example = {
24 "years_experience_score": 6,
25 "education_training_score": 7,
26 "execution_ability_score": 7,
27 "problem_solving_score": 7,
28 "confidence_score": 7,
29 "idea_difficulty_score": 6,
30 "leadership_score": 6,
31 "networking_score": 6
32}
33
34X = pd.DataFrame([example], columns=FEATURE_COLS).astype("float32").values
35probs = clf.predict_proba(X)[0]
36pred = int(np.argmax(probs))
37
38print("Predicted class:", INV[pred])
39print("Class probabilities:", {INV[i]: float(probs[i]) for i in range(len(probs))})