OPEN-ARC Open Models
Collection
A collection of available base models for our OPEN-ARC project: https://github.com/Infinitode/OPEN-ARC.
•
7 items
•
Updated
Repository: https://github.com/Infinitode/OPEN-ARC/
OPEN-ARC-BPP is a simple XGBClassifier model developed as part of Infinitode's OPEN-ARC initiative. It was designed to determine a person's basic personality type (introvert/extrovert) based on several personal questions.
Architecture:
n_estimators=200, learning_rate=0.1, max_depth=4, eval_metric="logloss", use_label_encoder=False, random_state=42.| Metric | Value |
|---|---|
| Testing Accuracy | 92.0% |
| Testing Weighted Average Precision | 92% |
| Testing Weighted Average Recall | 92% |
| Testing Weighted Average F1 | 92% |
| Testing ROC AUC | 95.5% |
import joblib
import pandas as pd
import numpy as np
# Load artifacts
art = joblib.load("personality_artifacts.pkl")
model = art["model"]
num_imputer = art["num_imputer"]
cat_imputer = art["cat_imputer"]
ohe = art["ohe"]
le = art["label_encoder"]
num_cols = art["num_cols"]
cat_cols = art["cat_cols"]
def ask(prompt, cast=str, options=None):
"""Tiny helper to get clean input."""
while True:
try:
val = cast(input(prompt))
if options and val not in options:
raise ValueError(f"Must be one of {options}")
return val
except Exception as e:
print(f"Error: {e}. Try again.\n")
def predict_personality():
print("\n🎭 Introvert vs Extrovert Predictor")
print("Answer a few quick questions:\n")
# Gather answers
answers = {
"Time_spent_Alone": ask("Hours spent alone per day (0‑24): ", float),
"Stage_fear": ask("Stage fear? (Yes/No): ", str.title, ["Yes", "No"]),
"Social_event_attendance":ask("Social events per week (0‑10): ", int),
"Going_outside": ask("Trips outside per day (0‑10): ", int),
"Drained_after_socializing": ask("Feel drained after socializing? (Yes/No): ",
str.title, ["Yes", "No"]),
"Friends_circle_size": ask("Number of close friends (0‑30): ", int),
"Post_frequency": ask("Social‑media posts per week (0‑30): ", int),
}
# Build one‑row DataFrame in correct column order
row = pd.DataFrame([answers])[num_cols + cat_cols]
# --- Re‑run exact preprocessing -------------------------------------------------
X_num = num_imputer.transform(row[num_cols])
X_cat = cat_imputer.transform(row[cat_cols])
X_cat_enc = ohe.transform(X_cat)
X_ready = np.hstack([X_num, X_cat_enc])
# --- Predict --------------------------------------------------------------------
proba = model.predict_proba(X_ready)[0]
idx = proba.argmax()
pred_label = le.inverse_transform([idx])[0]
confidence = proba[idx]
print(f"\n🔮 You are likely an **{pred_label}** (confidence {confidence:.0%}).")
predict_personality()
For questions or issues, open a GitHub issue or reach out at https://infinitode.netlify.app/forms/contact.