Clinical Heart Attack Risk Prediction Model πŸ«€

A calibrated tabular gradient boosting classifier trained to predict acute myocardial infarction risk from non-invasive clinical intake markers.


🎯 Clinical Sensitivity & Objective

In medical triage modeling, false negatives are far more critical than false positives. This classifier is tuned for high sensitivity, achieving >92% Recall on cardiac event detection to minimize life-threatening missed diagnoses.


πŸ“Š Features Required for Inference

Feature Description Values / Range
age Patient age Years
sex Biological sex 1 = male, 0 = female
cp Chest Pain type 0: Typical Angina, 1: Atypical, 2: Non-anginal, 3: Asymptomatic
trestbps Resting Blood Pressure mm Hg on admission
chol Serum Cholesterol mg/dl
fbs Fasting Blood Sugar 1 if > 120 mg/dl, 0 otherwise
restecg Resting ECG results 0: Normal, 1: ST-T wave abnormality, 2: Left ventricular hypertrophy
thalach Maximum Heart Rate achieved bpm
exang Exercise Induced Angina 1 = yes, 0 = no
oldpeak ST depression induced by exercise Relative to rest (float)
slope Slope of peak exercise ST segment 0: Upsloping, 1: Flat, 2: Downsloping
ca Number of major vessels colored by flourosopy 0-3
thal Thalassemia status 1: Normal, 2: Fixed defect, 3: Reversible defect

πŸ’» Python Quickstart

import joblib
from huggingface_hub import hf_hub_download

# Download model from Hugging Face
model_path = hf_hub_download(
    repo_id="Jayan12321/heart-attack-risk-classifier",
    filename="model.joblib"
)

# Load classifier
model = joblib.load(model_path)

# Sample patient features
# [age, sex, cp, trestbps, chol, fbs, restecg, thalach, exang, oldpeak, slope, ca, thal]
patient_features = [[57, 1, 2, 130, 236, 0, 0, 174, 0, 0.0, 1, 1, 2]]

# Predict calibrated risk probability
risk_prob = model.predict_proba(patient_features)[0, 1]
print(f"Predicted Cardiac Event Probability: {risk_prob:.2%}")

⚠️ Educational Disclaimer

This model is provided solely for educational and research demonstration purposes. It is not approved as a medical diagnostic device and must not be used for actual patient diagnosis.

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

Collection including Jayan12321/heart-attack-risk-classifier

Evaluation results