HeartMap is a prototype expert system designed for cardiology departments to support medical staff in in patient risk assessment and triage prioritization. The system provides:
- a binary risk prediction (heart disease vs no heart disease);
- a probabilistic prioritization score for triage ordering;
- a simple Streamlit-based user interface to demonstrate the system capabilities.
HeartMap is an academic prototype developed as part of the final exam for the Artificial Intelligence course, held at University of Catania.
git clone https://github.com/weiss25r/HeartMap.git
cd HeartMap
pip install -r requirements.txtstreamlit run app/app.pyHeartMap/
├── config/
│ └── system_config.yaml # Bayesian network configuration file
|-- docs/
└── report.pdf
├── heartmap/
│ └── bnetwork.py
│ └── predictor.py
│ ├── triage.py
├── models/ #Exported models
| ├── bnetwork.xlds
| ├── encoder.pkl
| ├── tree.skops
├── notebooks/
└── data_collection.ipynb #Data collection and cleaning
│ └── training_bnetwork.ipynb #Bayesian network training and export
│ └── training_cls.ipynb #Classifier training, evaluation and export
└── requirements.txt
HeartMap is composed of two AI components:
- Machine Learning Predictor: a Decision Tree classifier trained on the UCI Heart Disease dataset, with recall-oriented optimization to reduce false negatives. The model is intentionally simple to favor interpretability;
Training, evaluation and export is performed on the jupyter notebook
notebooks/training_cls.ipynb - Bayesian Network: a fully configurable probabilistic graphical model used to estimate the probability of a patient to be ill, which is then used to rank patients by decreasing risk; The network is fully specified using the YAML configuration file
config/system_config.yaml, and then trained and exported using notebooknotebooks/training_bnetwork.ipynb
Tech stack:
All credits to the original authors of the Heart Disease Dataset.