# Detection of rare medical events in electronic health records using machine learning: Current practices and suggestions – A scoping review

**Authors:** Biniyam Gebeyehu, Bennett Kleinberg, Katrijn Van Deun, Esther de Vries

PMC · DOI: 10.1371/journal.pone.0332963 · PLOS One · 2026-03-16

## TL;DR

This scoping review examines how machine learning is used to detect rare medical events in electronic health records and highlights gaps in current practices.

## Contribution

The paper provides a comprehensive overview of current ML-based anomaly detection practices in EHRs and identifies areas needing improvement.

## Key findings

- The median proportion of the anomalous class across studies was 0.079, with a wide range from 0.00045 to 0.23.
- Many studies lacked detailed reporting on data preprocessing and handling of missing data.
- Only a few studies considered the clinical implications of false positives and false negatives.

## Abstract

Routine healthcare data are increasingly stored in electronic health records (EHRs), presenting an exciting opportunity to leverage machine learning (ML) for detecting and predicting medical events. While medical experts are optimistic about expanding its applications, several caveats exist which are often overlooked. Many medical outcomes are categorical (e.g., a diagnosis is present or absent) with categories being considerably unequal in size, which might significantly impact the performance of ML algorithms. Detecting small subgroups in EHR data, so-called anomaly detection, is an emerging approach, yet organized documentation on current practices remains scarce. This scoping review examines medical anomaly detection based on routine healthcare data stored in EHRs and formulated alternative approaches in case suboptimal practices were noticed.

PubMed and Web of Science were searched up to September 5, 2024. Peer-reviewed articles and conference papers on ML-based medical anomaly detection in EHR data were included. Fifty-two study characteristics were extracted and analyzed both quantitatively and qualitatively.

A total of 117 studies met the inclusion criteria. The cross-study median proportion of the anomalous class was 0.079 (range 0.00045–0.23). Key details, e.g., data preprocessing actions, were often incomplete; 14.5% (n = 17) provided no information on this aspect. Only four studies reported the underlying cause of missingness before deciding how to handle it, and just three considered the clinical implications of false positives and false negatives when evaluating anomaly detection performance.

We identified a need for greater attention in the current medical anomaly detection literature for reporting details on pre-processing, handling of missing data, and the use of performance metrics. With the increasing number of anomaly detection studies based on routine healthcare data stored in EHRs, more focus is needed on implementation and reporting practices to ensure relevance and reproducibility of future studies in this field.

## Full-text entities

- **Diseases:** critically ill (MESH:D016638), respiratory anomaly (MESH:D015619), ML (MESH:D007859), medical anomaly (MESH:D000069279), anomaly (MESH:D000013), overdose (MESH:D062787), sleep apnea (MESH:D012891)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12991209/full.md

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12991209/full.md

## References

52 references — full list in the complete paper: https://tomesphere.com/paper/PMC12991209/full.md

---
Source: https://tomesphere.com/paper/PMC12991209