mjpsm/Confidence-XGB

What it does
Predicts a person’s confidence level β€” Low (0), Medium (1), or High (2) β€” from 10 numeric/ratio features.

Input Features (and how ratings affect predictions)

  1. self_efficacy (1–10) β€” belief in one’s ability. Higher β†’ more likely High.
  2. past_success_rate (0–100) β€” % of goals achieved. Higher success β†’ higher confidence.
  3. preparation_time_hours (0–40) β€” average prep hours. More prep β†’ higher confidence (with plateau).
  4. feedback_positive_ratio (0–1) β€” positive / total feedback. Higher β†’ higher confidence.
  5. support_system_strength (1–10) β€” perceived support. Higher β†’ higher confidence.
  6. stress_management (1–10) β€” coping under pressure. Higher β†’ higher confidence.
  7. growth_mindset (1–10) β€” belief skills improve with effort. Higher β†’ higher confidence.
  8. resilience_score (1–10) β€” bounce-back ability. Higher β†’ sustains confidence after setbacks.
  9. task_familiarity (1–10) β€” experience with task type. Higher β†’ higher confidence.
  10. task_difficulty_perception (1–10) β€” perceived difficulty. Higher β†’ lower confidence.

Labels

  • 0 β†’ Low, 1 β†’ Medium, 2 β†’ High
    (See label_map.json.)

Training Summary

  • Framework: XGBoost (hist)
  • Data: 3,000 rows (balanced 1,000/class)
  • Split: 70/15/15, early stopping=100
  • Metrics (test): Acc 0.982, Macro-F1 0.982, LogLoss 0.046
    See training_summary.json; confusion matrix in confusion_matrix.png.

Load & Predict

from huggingface_hub import hf_hub_download
from xgboost import XGBClassifier
import json, pandas as pd

REPO = "mjpsm/Confidence-XGB"

model_file = hf_hub_download(REPO, "xgb_model.json")
feat_file  = hf_hub_download(REPO, "feature_order.json")
map_file   = hf_hub_download(REPO, "label_map.json")

clf = XGBClassifier(); clf.load_model(model_file)
features = json.load(open(feat_file))
label_map = json.load(open(map_file))
inv = {v:k for k,v in label_map.items()}

x = pd.DataFrame([{
  "self_efficacy": 8, "past_success_rate": 76, "preparation_time_hours": 12,
  "feedback_positive_ratio": 0.72, "support_system_strength": 7, "stress_management": 6,
  "growth_mindset": 9, "resilience_score": 8, "task_familiarity": 7, "task_difficulty_perception": 4
}])[features]

p = clf.predict_proba(x); pred_id = int(p.argmax(axis=1)[0])
print("Pred:", inv[pred_id], "(id:", pred_id, ")", "proba:", p[0].round(4).tolist())
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Evaluation results

  • accuracy on confidence_dataset_v1_3000 (synthetic, balanced)
    self-reported
    0.982
  • macro_f1 on confidence_dataset_v1_3000 (synthetic, balanced)
    self-reported
    0.982
  • log_loss on confidence_dataset_v1_3000 (synthetic, balanced)
    self-reported
    0.046