Tabular Classification
Scikit-learn
Joblib
ONNX
English
healthcare
medical
disease-prediction
ensemble
scikit-learn
Eval Results (legacy)
Instructions to use Av1447/Health with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use Av1447/Health with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("Av1447/Health", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
π©Ί AI-Driven Healthcare Disease Prediction Ensemble
A multi-model ensemble classifier built with Scikit-Learn combining Random Forest, Support Vector Machines (RBF Kernel), and Gaussian Naive Bayes to predict clinical pathologies from patient symptom indicators.
π Model Details
- Architecture:
VotingClassifierwith soft probability voting - Sub-Estimators:
RandomForestClassifier(100 estimators, Gini criterion) β Weight:0.40SVC(Radial Basis Function Kernel, probability=True) β Weight:0.35GaussianNB(Multinomial Prior Likelihood) β Weight:0.25
- Number of Symptom Features: 180 binary indicators (0 = absent, 1 = present)
- Number of Disease Classes: 10 target pathologies
- Test Accuracy: 13.33% on independent clinical testing cohort
π¦ Files in this Repository
| File | Description |
|---|---|
model.joblib |
The complete trained VotingClassifier ensemble pipeline. |
symptoms.json |
Array of 180 symptom feature names in exact column sequence. |
diseases.json |
List of all 10 prognostic disease labels. |
prescriptions.json |
Clinical treatment and prescription mapping for predicted pathologies. |
π» Quickstart Inference (Python)
import joblib
import json
import numpy as np
import pandas as pd
from huggingface_hub import hf_hub_download
# 1. Download model and feature list from Hugging Face
REPO_ID = "YOUR_USERNAME/YOUR_MODEL_NAME" # e.g., "Av1447/disease-prediction-ensemble"
model_path = hf_hub_download(repo_id=REPO_ID, filename="model.joblib")
symptoms_path = hf_hub_download(repo_id=REPO_ID, filename="symptoms.json")
model = joblib.load(model_path)
with open(symptoms_path, "r") as f:
symptom_features = json.load(f)
# 2. Build input vector for patient symptoms
# Example: Patient has Headache and Sensitivity to Light
patient_symptoms = ["Headache", "Sensitivity to Light", "Sensitivity to Sound"]
# Binary vector (1 if symptom is present, 0 otherwise)
input_vector = [1 if feature in patient_symptoms else 0 for feature in symptom_features]
input_df = pd.DataFrame([input_vector], columns=symptom_features)
# 3. Predict disease and probability
probabilities = model.predict_proba(input_df)[0]
top_idx = probabilities.argmax()
predicted_disease = model.classes_[top_idx]
confidence = probabilities[top_idx] * 100
print(f"Predicted Diagnosis: {predicted_disease} ({confidence:.1f}% confidence)")
π Serverless Inference API / Web Usage
You can query this model directly via Hugging Face Serverless Inference API or via client-side web applications hosted on Vercel or GitHub Pages.
// Example JavaScript fetch from your frontend
const response = await fetch(
"https://api-inference.huggingface.co/models/YOUR_USERNAME/YOUR_MODEL_NAME",
{
headers: {
Authorization: "Bearer hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
},
method: "POST",
body: JSON.stringify({ inputs: [inputVector] }),
}
);
const result = await response.json();
βοΈ Intended Use & Disclaimer
This model is developed for research, education, triage assistance, and prototyping. It is not intended to replace professional medical diagnosis, laboratory testing, or clinical consultation.
- Downloads last month
- -
Evaluation results
- Test Accuracyself-reported0.133