This project prioritises minimising false negatives over raw accuracy — because in cardiac diagnostics, missing a real case has greater consequences than a false alarm. Model selection reflects that.
This project analyzes the prediction of heart disease using machine learning techniques. The main goals are:
- Evaluate and compare three classifiers:
- k-Nearest Neighbors (kNN)
- C5.0 Decision Trees (with and without boosting/cost matrix)
- Neural Networks
- Minimize false negatives to avoid misdiagnosis.
- Visualize model performance and interpret results.
The analysis uses the Statlog Heart Disease Dataset from the UCI Machine Learning Repository.
HeartDiseasePrediction/
│
├── data/
│ └── heart.dat # Dataset used in the analysis
│
├── HeartDiseasePrediction.Rmd # Main analysis document
├── HeartDiseasePrediction.pdf # Compiled PDF output
├── README.md # Project description
└── .gitignore # Ignore temporary and output files
- R version 4.0 or higher
- R packages:
class,gmodels,C50,neuralnetdplyr,MLmetrics,mltools,ggplot2,tidyr,knitr
- All datasets are stored in
data/. - A fixed seed (
set.seed(123)) is used to ensure reproducibility. - The analysis prioritizes reducing false negatives to improve diagnostic reliability.
- UCI Machine Learning Repository: Statlog Heart Disease Dataset
- Documentation for R packages:
class,C50,neuralnet - Machine learning literature on heart disease prediction
Additional references and detailed explanations are included in HeartDiseasePrediction.pdf.