CVRIE is a two-part applied machine-learning project built around healthcare-related data.
It combines:
- a supervised pipeline for binary chest X-ray classification (
NORMALvsPNEUMONIA) - an unsupervised pipeline for clustering short patient testimonies into coherent symptom-language groups
The repository is organized as a reproducible analytical codebase rather than a single notebook dump. Each project section contains:
- a research notebook
- reusable Python modules under
src/ - generated artifacts such as metrics, figures, and models
The supervised track evaluates whether classical machine learning can classify chest X-rays while avoiding common dataset traps such as:
- patient leakage across splits
- duplicate images across subsets
- augmentation bias
- class-correlated image geometry shortcuts
Main outcome:
- best pipeline:
normalizedpreprocessing + HOG + RBF SVM - final image-level holdout performance:
- Accuracy:
0.9607 - Balanced accuracy:
0.9506 - F1-score:
0.9727 - ROC-AUC:
0.9906
- Accuracy:
- final patient-level ROC-AUC:
0.9949
This part is not just a classifier benchmark. It is also a leakage audit and a stricter re-evaluation of a widely reused medical-imaging dataset.
Detailed documentation: supervised/README.md
The unsupervised track clusters short, unlabelled patient testimonies using only text content.
It includes:
- dataset structure repair
- linguistic preprocessing
- TF-IDF vectorization
- latent semantic projection with TruncatedSVD
- clustering comparison across multiple algorithms
- stability analysis with Adjusted Rand Index
- cluster interpretation
Main outcome:
- best pipeline: extended preprocessing + TF-IDF +
TruncatedSVD(50)+KMeans(k=12) - final metrics:
- Silhouette:
0.0982 - Calinski-Harabasz:
30.2734 - Davies-Bouldin:
2.9877
- Silhouette:
- stability across 10 runs:
- Mean ARI:
0.7000 - ARI std:
0.0548
- Mean ARI:
The final clusters capture recurring themes such as respiratory symptoms, headaches, rashes, burns, limb pain, and blood-sugar-related complaints.
Detailed documentation: unsupervised/README.md
cvrie/
|- data/
| |- chest_xray/
| `- Student_Dataset.csv
|- supervised/
| |- artifacts/
| |- notebooks/
| |- src/
| `- README.md
|- unsupervised/
| |- artifacts/
| |- notebooks/
| |- src/
| `- README.md
|- requirements.txt
`- README.md
- Source: Kaggle Chest X-Ray Images (Pneumonia)
- Original file count:
8,530 - Leakage-aware rebuilt split:
- Train:
6,016images - Validation:
1,266images - Test:
1,248images
- Train:
- Source file:
data/Student_Dataset.csv - Rows:
1,011 - Structural repairs applied:
397shifted rows corrected
- modular Python implementation instead of notebook-only logic
- reproducible preprocessing and inference helpers
- saved metrics and analysis artifacts
- explicit attention to data quality, leakage, and evaluation design
- classical ML and NLP methods used with strong experimental discipline
Install dependencies from the repository root:
pip install -r requirements.txtStart with the section README files:
supervised/README.mdunsupervised/README.md
Then open the notebooks:
jupyter notebook supervised/notebooks/supervised.ipynb
jupyter notebook unsupervised/notebooks/unsupervised.ipynb- On medical-image tasks, careful split design and leakage control are as important as model choice.
- On short-text clustering tasks, internal metrics alone are not enough; stability and interpretability matter.
- In both tracks, the most valuable output is not only the final score, but the rigor of the methodology used to obtain it.
This repository is an academic and engineering project.
- The supervised model is not a clinical diagnostic tool.
- The unsupervised clusters are not diagnoses.
- Neither pipeline should be used for medical decision-making.