Academic
ECG arrhythmia classification: supervised and unsupervised learning
MIT-BIH Arrhythmia classification (5 classes, 156 features/signal). KNN, RandomForest, KMeans, agglomerative clustering. SHAP, Boruta, PCA analysis.
- 92.5%
- RF Accuracy
- 135
- Boruta features
- 5
- Classes
01Context
Two-person project at ENSEEIHT: comparison of supervised and unsupervised methods on real biomedical data (MIT-BIH Arrhythmia dataset).
02Technical pipeline
- MIT-BIH dataset
- PCA 23 components (90%)
- GridSearchCV
- RandomForest 200 est.
- SHAP + Boruta
03What I did
DTW (Dynamic Time Warping): per-class median signal computation (6 min vs >30 min brute), baseline 0.575.
KNN: GridSearch → Manhattan metric, k=1, accuracy 0.924.
RandomForest: 200 estimators, GridSearch → accuracy 0.925 (best result).
KMeans: silhouette analysis optimization → 39 clusters → accuracy 0.790.
Agglomerative clustering: 75 clusters → accuracy 0.823.
PCA + Boruta: 23 components (90% variance). Boruta: 156→135 feature reduction, accuracy maintained at 0.922.
04Measured results
- 92.5%
- RandomForest
- 92.4%
- KNN Manhattan
- 82.3%
- Agglomerative
- 79%
- KMeans
- 92.2%
- Boruta (135 feat.)
- 57.5%
- DTW baseline
05Challenges
- DTW very slow: per-class median reduction required (6 min vs >30 min)
- Persistent class 0/1 confusion (normal vs unknown beats) across all methods
- KMeans: empty clusters beyond n_clusters > 39
Want to talk it through?
Happy to go into the technical choices, the measurements and what I would do differently.