Predicting annual healthcare expenditures using demographic and clinical features — built with Python and Scikit-learn.
# Egypt Healthcare Cost Prediction
> Predicting annual healthcare expenditures using demographic and clinical features — built with Python and Scikit-learn.
---
## Overview
Healthcare systems face increasing financial pressure from rising treatment costs and growing chronic disease prevalence. This project builds machine learning models to predict patients' annual healthcare expenditures, helping:
- **Insurance companies** estimate risk and set fair premiums
- **Hospitals** allocate resources more efficiently
- **Policymakers** identify and address key drivers of healthcare spending
The best model — **Gradient Boosting** — achieves **R² ≈ 0.887**, an RMSE of ~2,538 EGP, and an MAE of ~1,995 EGP on held-out test data.
---
## Project Structure
```
egypt-healthcare-cost-prediction/
│
├── Egypt_healthcare_cost_prediction_enhanced.ipynb # Main notebook
├── egypt_healthcare_synthetic_data.csv # Dataset
│
├── eda_overview.png # EDA grid
├── model_comparison.png # Model comparison chart
├── prediction_diagnostics.png # Actual vs Predicted & residuals
├── feature_importance.png # Feature importance plot
│
├── requirements.txt
└── README.md
```
---
## Dataset
> **This dataset is synthetically generated for educational purposes.** It does not represent real patient records.
| Feature | Type | Description |
|---|---|---|
| `age` | Numeric | Patient age |
| `bmi` | Numeric | Body mass index |
| `num_dependents` | Numeric | Number of dependents |
| `chronic_conditions` | Numeric | Number of chronic diseases |
| `visits_per_year` | Numeric | Annual healthcare visits |
| `smoker` | Binary | Smoking status |
| `diabetes` | Binary | Diabetes diagnosis |
| `hypertension` | Binary | Hypertension diagnosis |
| `obese` | Binary | Obesity status |
| `insured` | Binary | Insurance coverage |
| `sex` | Categorical | Patient sex |
| `region` | Categorical | …