--- language: en license: mit tags: - regression - xgboost - soulprint - imani datasets: - custom metrics: - mse - r2 model-index: - name: Imani XGBoost Regression Model results: - task: type: regression name: Soulprint Archetype Scoring dataset: name: Imani-regression-data type: custom metrics: - name: MSE type: mse value: 0.00866 - name: Rยฒ type: r2 value: 0.892 --- # ๐Ÿ•Š๏ธ Imani XGBoost Regression Model This model is part of the **Soulprint archetype system**, designed to measure the presence of the **Imani (Faithful)** archetype in text. It outputs a **score between 0.0 and 1.0** that reflects the degree of *faith, resilience, and affirmation* expressed. - **Framework:** XGBoost - **Embeddings:** SentenceTransformer (`all-mpnet-base-v2`) - **Training Data Size:** 819 samples - **Balanced dataset:** Low, mid, and high Imani scores evenly distributed (~33% each) --- ## ๐Ÿงพ Model Details - **Archetype:** Imani (Faithful) - **Description:** Sacred conviction and hope, even in adversity. - **Traits captured:** Encouraging, spiritual, consistent, compassionate. - **Perspective:** *Faith is the seed, action is the rain.* - **Output range:** `0.0 โ€“ 1.0` --- ## ๐Ÿ“Š Training Results - **MSE:** `0.00866` - **Rยฒ:** `0.892` These metrics indicate that the model is highly accurate, with predictions averaging less than `0.1` away from true labels on the 0โ€“1 scale. --- ## ๐Ÿš€ Usage You can load the model directly from Hugging Face Hub and run predictions: ```python import xgboost as xgb from sentence_transformers import SentenceTransformer from huggingface_hub import hf_hub_download # ----------------------------- # 1. Download model from Hugging Face # ----------------------------- REPO_ID = "mjpsm/Imani-xgb-model" FILENAME = "Imani_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 reminded my cousin that storms always pass." embedding = embedder.encode([text]) score = model.predict(embedding)[0] print("Predicted Imani Score:", round(float(score), 3)) ```