Predictive Machine Learning & Risk Analytics
Collection
Cost-sensitive fraud triage systems, calibrated clinical risk models, and multivariate sensor telemetry. β’ 7 items β’ Updated
A calibrated tabular gradient boosting classifier trained to predict acute myocardial infarction risk from non-invasive clinical intake markers.
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.
| 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 |
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%}")
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.