Bayesian Networks
Heart Attack Prediction
Bayesian Network Model applied to the prediction of a heart attack using variable elimination methods.
Course: Introduction to Data Science

Objectives
- 1Predict the probability of suffering a heart attack using Bayesian Networks.
- 2Apply variable elimination method on a directed acyclic graph and compare the result with the methods implemented in pgmpy.
Conclusions
- The probability of heart attack for a smoker is 57.5%, and increases to 62.75% when combined with high cholesterol.
- The probability of having high blood pressure given a heart attack is 91.25%.
- Manual calculations using variable elimination matched pgmpy library results exactly, validating the implementation.
- Finding the optimal ordering of summations over hidden variables is an NP-HARD problem, requiring heuristics like min-neighbors.
Technologies
- Pgmpy
- FastAPI
- Python
- Pandas
- NumPy