Downloads · 30 days
0
mjpsm/Nzinga-xgb-model
Nzinga-xgb-model is a machine learning model from mjpsm. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
The Nzinga XGBoost Regression Model is part of the Soulprint Archetype Series. It predicts a courage score (0.0 – 1.0) from input text, reflecting levels of hesitation, partial action, steady resolve, and fearless con…
Downloads · 30 days
0
Access
Public
Updated Sep 27, 2025
Repo size
—
Likes
0
Public
Click a slice to open those files.
.json2 MB · 100%
From the Hugging Face model README
The Nzinga XGBoost Regression Model is part of the Soulprint Archetype Series. It predicts a courage score (0.0 – 1.0) from input text, reflecting levels of hesitation, partial action, steady resolve, and fearless conviction.
This model is named after Queen Nzinga of Ndongo and Matamba, representing courage, resistance, and unshakable determination.
Source: Custom Nzinga regression dataset (balanced across 4 ranges).
Size: 1368 examples
Balance: 342 rows per range:
Low (0.0–0.3): hesitant, almost-action, retreating moments
Mid (0.3–0.6): measured firmness, small everyday acts of courage
High (0.6–0.9): strong steady action, visible resolve
Peak (0.9–1.0): fearless symbolic acts, full conviction
Sentence lengths were cycled (1, 2–3, 4–5 sentences) to encourage generalization. Contexts include family, healthcare, online spaces, sports, workplaces, and public gatherings.
Test Metrics:
This indicates the model explains ~82% of the variance in courage scores and has low error, making it robust for prediction tasks.
import xgboost as xgb
from sentence_transformers import SentenceTransformer
from huggingface_hub import hf_hub_download
# -----------------------------
# 1. Download model
# -----------------------------
REPO_ID = "mjpsm/Nzinga-xgb-model"
FILENAME = "Nzinga_xgb_model.json"
model_path = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
# -----------------------------
# 2. Load model + embedder
# -----------------------------
model = xgb.XGBRegressor()
model.load_model(model_path)
embedder = SentenceTransformer("all-mpnet-base-v2")
# -----------------------------
# 3. Example prediction
# -----------------------------
text = "I stood before the crowd and spoke with steady confidence."
embedding = embedder.encode([text])
score = model.predict(embedding)[0]
print("Predicted Nzinga Score:", round(float(score), 3))