When Algorithms Meet Clinical Data
The AIIMS Bhopal team built the SONA questionnaire for OSA screening (Joshi A, Goyal A, Pakhare A, 2025):
. . .
This IS machine learning — even though it used logistic regression. ML is not about fancy algorithms. It’s about the discipline of training on one dataset and testing on another.
Algorithms that learn patterns from data to make predictions — without explicit rules.
| Traditional Statistics | Machine Learning | |
|---|---|---|
| Goal | Understand relationships (inference) | Make accurate predictions |
| Model choice | Theory-driven | Data-driven |
| Interpretability | Usually high | Variable |
| Validation | CI, p-values | Train/test split, AUC |
| Overfitting | Managed by theory | Managed by held-out test data |
Tip
Logistic regression is BOTH statistics and ML. The difference isn’t the math — it’s how you use it. Inference → statistics. Prediction with train/test → ML.
Algorithm learns from labelled examples.
| Task | Output | Example |
|---|---|---|
| Classification | Category | OSA yes/no |
| Regression | Number | Predict AHI |
Algorithm finds hidden structure — no labels.
| Task | What | Example |
|---|---|---|
| Clustering | Groups | HTN subtypes |
| Dimensionality | Compress | Gene expression |
| Algorithm | Interpretability | Data needed | Best for |
|---|---|---|---|
| Logistic regression | ★★★★★ | Small–medium | Risk scores (SONA) |
| Decision tree | ★★★★☆ | Small–medium | Clinical decision rules |
| Random forest | ★★☆☆☆ | Medium–large | Tabular clinical data |
| Gradient boosting | ★★☆☆☆ | Medium–large | Prediction competitions |
| Neural network | ★☆☆☆☆ | Very large | Images, text, ECG signals |
For clinical screening tools (like SONA), logistic regression is often the best choice — interpretable, works with smaller data, and coefficients convert to simple point scores.
The gap between training and test accuracy = overfitting. Training accuracy is advertising; test accuracy is truth.
Signs: Training 98% → Test 65% | Too many features for sample size | Absurd predictions at extremes
Use when: Not enough data for a separate test set. More robust than a single split.
AUC: 0.50 = coin flip | 0.70–0.79 = acceptable | 0.80–0.89 = excellent | 0.90+ = outstanding
Disease prevalence = 1%. Model predicts “no disease” for everyone.
| Metric | Value |
|---|---|
| Accuracy | 99% ← looks great! |
| Sensitivity | 0% ← catches NOTHING |
| Specificity | 100% |
| PPV | Undefined |
Warning
Never evaluate a model on accuracy alone. With imbalanced classes, accuracy is meaningless. Always report sensitivity, specificity, PPV, NPV, and AUC.
| Application | Technology | Impact |
|---|---|---|
| Diabetic retinopathy | Deep learning on retinal images (Google + Aravind Eye Hospital) | Screening where ophthalmologists are scarce |
| TB from chest X-ray | CAD4TB, qXR (Qure.ai) — WHO recommended | Active case-finding in high-burden settings |
| ECG interpretation | AI on portable ECG (SanketLife) | PHCs without cardiologists |
| OSA screening | SONA score (AIIMS Bhopal) — logistic regression | Primary care tool for resource-limited settings |
Common thread: ML is most impactful where specialist access is limited — extending expert-level decisions to primary care.
| # | Question | Red flag |
|---|---|---|
| 1 | Was data split into training and testing? | Only training accuracy reported |
| 2 | Was external validation performed? | Tested only where it was developed |
| 3 | Were multiple metrics reported (not just accuracy)? | Only accuracy or AUC |
| 4 | Was overfitting addressed? | High accuracy + complex model + small sample |
| 5 | Were predictors available at time of decision? | Predictors include future information (data leakage) |
| 6 | Is the model clinically useful (better than current practice)? | Marginal improvement over simple clinical rules |
Cardinal rule: If they only report training performance → the results are meaningless.
Warning
Always validate across diverse populations before deployment.
A district hospital has 5 years of lab data on 10,000 patients. They want to identify hidden patient subtypes among diabetics based on HbA1c trajectories, comorbidity patterns, and treatment responses — without predefining the groups.
Unsupervised learning (clustering) — There are no predefined labels; the goal is to discover natural groupings. K-means or hierarchical clustering could identify phenotypic subtypes of diabetes, potentially guiding personalised treatment strategies.
A research team develops an AI system to detect pneumothorax on chest X-rays using 50,000 labelled images from a tertiary hospital. They report AUC = 0.97 on an internal test set. A PHC wants to deploy it.
Supervised learning (classification) — but needs external validation first. The AUC = 0.97 is on internal data. The PHC has different X-ray machines, image quality, and patient population. The model MUST be tested on PHC data before deployment. Internal AUC ≠ real-world performance.
A researcher with data from 80 patients and 200 clinical variables builds a random forest model for predicting ICU mortality. Training accuracy is 96%. She has no separate test set.
This is almost certainly overfitted. 200 features on 80 patients (features > patients!) is a recipe for overfitting. The 96% training accuracy is meaningless without a test set. She should use cross-validation, reduce features (variable selection), or use a simpler model (logistic regression with ≤5 predictors).
Warning
Biostatistics for Clinicians | Module 15