Unsupervised Clustering of Longitudinal Clinical Measurements in Electronic Health Records

Arshiya Mariam, Hamed Javidi, Emily C. Zabor, Ran Zhao, Tomas Radivoyevitch, Daniel M. Rotroff

Abstract

Longitudinal electronic health records (EHR) can be utilized to identify patterns of disease development and progression in real-world settings. Unsupervised temporal matching algorithms are being repurposed to EHR from signal processing- and protein-sequence alignment tasks where they have shown immense promise for gaining insight into disease. The robustness of these algorithms for classifying EHR clinical data remains to be determined. 

Timeseries compiled from clinical measurements, such as blood pressure, have far more irregularity in sampling and missingness than the data for which these algorithms were developed, necessitating a systematic evaluation of these methods. We applied 30 state-of-the-art unsupervised machine learning algorithms to 6,912 systematically generated simulated clinical datasets across five parameters.

Introduction

The application of unsupervised machine learning algorithms to longitudinal electronic health records (EHRs) offers unprecedented opportunities to identify patterns of clinical biomarkers that can improve health and derive new insights in disease progression from real world cohorts [1–6]. Historically, timeseries matching algorithms, such as dynamic time warping (DTW), have shown immense potential where timeseries intervals are regular, such as speech recognition, audio signal processing, and protein sequence alignments [7–10]. Timeseries matching algorithms can be used to measure similarity between patient’s longitudinal data. 

These similarity measures can then be used to identify clusters of patients with similarly trajectories, leading to new clinical insights [11,12]. However, the longitudinal data captured in the EHR differs substantially from the types of data traditionally used to evaluate these methods. For example, a patient’s clinical data is greatly influenced by many factors

Results

Overall results

The 30 clustering algorithms were formed by combining two clustering assignment methods, six centroid computation methods and eight distance measures. Each method is described in detail in the supplemental information (S1 Text). The accuracy of clustering algorithms was assessed by calculating the Adjusted Rand Index (ARI) which ranges from -1 to 1 with values closer to zero indicating random sorting.

Discussion

Unsupervised machine learning algorithms have the potential to derive new insights in disease development, progression, and response to treatment [11,12]. Established timeseries matching algorithms have shown promise in fields such as signal processing and interest in their application in clinical data is growing. However, the accuracies and robustness of these algorithms in clinical data has not been systematically studied. Hence, our aim was to leverage simulated datasets developed from a several common clinical measurements (i.e., BMI, SBP, random glucose) to evaluate 30 unsupervised clustering algorithms composed, in part, of eight state-of-the-art timeseries matching algorithms. 

DTW is well-established as the gold standard for timeseries classification [19,20]. Our findings support that DTW and its variants (i.e., LB-Improved and DTW-LB) can more accurately identify underlying longitudinal patterns in clinical measurements than the other methods evaluated here.

Citation: Mariam A, Javidi H, Zabor EC, Zhao R, Radivoyevitch T, Rotroff DM (2024) Unsupervised clustering of longitudinal clinical measurements in electronic health records. PLOS Digit Health 3(10): e0000628. https://doi.org/10.1371/journal.pdig.0000628

Editor: Henry Horng-Shing Lu, National Yang Ming Chiao Tung University, TAIWAN

Received: January 10, 2024; Accepted: August 30, 2024; Published: October 15, 2024

Copyright: © 2024 Mariam et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

Data Availability: The datasets used and analyzed during the current study are available on figshare (DOI: 10.6084/m9.figshare.24790284).

Funding: This work was supported in part by an NIH grant: 1R61NS113258-01A1 (D.M.R). The funder played no role in study design, data collection, analysis and interpretation of data, or the writing of this manuscript.

Competing interests: D.M.R. has an equity stake in Clarified Precision Medicine and Genovation Health, LLC. D.M.R. has received research support from Novo Nordisk. D.M.R. owns intellectual property related to the detection of type 2 diabetes, chronic liver disease and liver cancer.