Downloads · 30 days
0
KubraParmak/heart-attack-prediction-model
heart-attack-prediction-model is a tabular classification model from KubraParmak. Use it for the tabular classification task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
⚠️ Disclaimer: This model is built for educational/portfolio purposes only. It is not a medical diagnostic tool and must not be used to make real health decisions. Always consult a qualified physician.
Downloads · 30 days
0
Access
Public
Updated Jun 26, 2026
Repo size
2.4 KB
Likes
0
Public
Click a slice to open those files.
.ipynb1.5 MB · 100%
From the Hugging Face model README
⚠️ Disclaimer: This model is built for educational/portfolio purposes only. It is not a medical diagnostic tool and must not be used to make real health decisions. Always consult a qualified physician.
A Logistic Regression model predicting heart attack risk (output: 0 = low risk, 1 = high risk) from patient clinical measurements.
Trained on the Heart Attack Analysis & Prediction Dataset (Kaggle), 303 patient records with 13 clinical features.
age, trtbps, chol, thalachh, oldpeak).sex, cp, fbs, restecg, exng, slp, caa, thall) one-hot encoded (drop_first=True).StandardScaler, fit on the training split only.heart_attack_artifact.joblib: dict with {"model", "scaler", "numeric_features", "feature_names"}.heart-attack-analysis-prediction.ipynb: full notebook (EDA, preprocessing, modeling, tuning).import joblib
import pandas as pd
from huggingface_hub import hf_hub_download
path = hf_hub_download(repo_id="KubraParmak/heart-attack-prediction-model", filename="heart_attack_artifact.joblib")
artifact = joblib.load(path)
model = artifact["model"]
scaler = artifact["scaler"]
numeric_features = artifact["numeric_features"]
feature_names = artifact["feature_names"]
# Build a row matching `feature_names`, scale numeric columns with `scaler`,
# then call model.predict(...) — see the Space's app.py for a full example.
Test accuracy: 0.90 (Logistic Regression, penalty='l2', chosen via GridSearchCV).
See KubraParmak/heart-attack-prediction-demo for an interactive Gradio demo.