Update README.md
#1
by
ella-carlotto
- opened
README.md
CHANGED
|
@@ -1,3 +1,46 @@
|
|
| 1 |
-
---
|
| 2 |
-
license:
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
library_name: scikit-learn
|
| 4 |
+
tags:
|
| 5 |
+
- regression
|
| 6 |
+
- tabular
|
| 7 |
+
- scikit-learn
|
| 8 |
+
- education
|
| 9 |
+
datasets:
|
| 10 |
+
- "heart-failure"
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Heart Failure Linear Regression Model
|
| 14 |
+
|
| 15 |
+
**Author:** Ella Carlotto
|
| 16 |
+
**Created:** November 2025
|
| 17 |
+
**Library:** scikit-learn
|
| 18 |
+
**Dataset:** UCI Heart Failure Clinical Records
|
| 19 |
+
**Task:** Tabular regression on a binary target (`DEATH_EVENT`)
|
| 20 |
+
|
| 21 |
+
## Model Description
|
| 22 |
+
This Linear Regression model predicts the likelihood of death (`DEATH_EVENT`) based on clinical features from the UCI Heart Failure Clinical Records dataset. All features are numeric, and the model was trained as a simple baseline regression example to demonstrate packaging and upload for educational use.
|
| 23 |
+
|
| 24 |
+
**Target:** `DEATH_EVENT` (0 = survived, 1 = death)
|
| 25 |
+
**Output:** Continuous score; higher values indicate higher likelihood of death.
|
| 26 |
+
|
| 27 |
+
## Files Included
|
| 28 |
+
- heart_failure_model.pkl — trained scikit-learn model
|
| 29 |
+
- heart_failure_config.json — model configuration metadata
|
| 30 |
+
- heart_failure_test_data.csv — held-out test dataset for evaluation
|
| 31 |
+
|
| 32 |
+
## Intended Uses and Limitations
|
| 33 |
+
- For educational and demonstration purposes only
|
| 34 |
+
- Not validated for medical, diagnostic, or clinical use
|
| 35 |
+
- Do not use for real-world predictions or patient decisions
|
| 36 |
+
|
| 37 |
+
## Example Usage
|
| 38 |
+
```python
|
| 39 |
+
import pickle, pandas as pd
|
| 40 |
+
with open("heart_failure_model.pkl", "rb") as f:
|
| 41 |
+
model = pickle.load(f)
|
| 42 |
+
|
| 43 |
+
df = pd.read_csv("heart_failure_test_data.csv")
|
| 44 |
+
X = df.drop(columns=["DEATH_EVENT"])
|
| 45 |
+
y_pred = model.predict(X)
|
| 46 |
+
print(y_pred[:5])
|