XGBoost Diabetes Prediction Model

Trained on the Pima Indians Diabetes Dataset using GridSearchCV.

Model Info

  • Algorithm: XGBoostClassifier
  • Best Params:
    • n_estimators: 100
    • max_depth: 3
    • learning_rate: 0.01
    • reg_lambda: 1.2
  • Test Accuracy: ~79%

How to Use

from huggingface_hub import hf_hub_download
import pickle

model_path = hf_hub_download(repo_id="Gaballa-ML/xgboost-diabetes-pima-project", filename="model.pkl")
with open(model_path, 'rb') as f:
    model = pickle.load(f)

# Predict: [Pregnancies, Glucose, BloodPressure, SkinThickness, Insulin, BMI, DiabetesPedigreeFunction, Age]
prediction = model.predict([[6, 148, 72, 35, 0, 33.6, 0.627, 50]])
print("Diabetes Prediction (0=No, 1=Yes):", prediction[0])
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