Views
No views yet
output: 0 = low risk, 1 = high risk) from patient clinical measurements.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).1import joblib
2import pandas as pd
3from huggingface_hub import hf_hub_download
4
5path = hf_hub_download(repo_id="KubraParmak/heart-attack-prediction-model", filename="heart_attack_artifact.joblib")
6artifact = joblib.load(path)
7
8model = artifact["model"]
9scaler = artifact["scaler"]
10numeric_features = artifact["numeric_features"]
11feature_names = artifact["feature_names"]
12
13# Build a row matching `feature_names`, scale numeric columns with `scaler`,
14# then call model.predict(...) — see the Space's app.py for a full example.penalty='l2', chosen via GridSearchCV).KubraParmak/heart-attack-prediction-demo for an interactive Gradio demo.