Machine Learning Prediction of Blood Potassium at Different Time Cutoffs

Jake Bergquist1, Deekshith Reddy Dade2, Brian Zenger1, Ravi Ranjan1, Rob MacLeod1, Benjamin A Steinberg1, Tolga Tasdizen1
1University of Utah, 2Univeristy of Utah


Abstract

Recent studies have developed ECG-ML tools to classify abnormal serum potassium. Because serum potassium and ECG morphology changes exhibit a well-understood connection, and the timeline of ECG changes can be rapid, there is motivation to explore the sensitivity of these potassium classification tasks with respect to the time between the ECG and potassium readings.

Using a dataset of over 350,000 matched clinical 12 lead ECGs and blood potassium measurements, we trained a convolutional neural network to classify abnormal (serum potassium above 5~mEq/L) vs normal (serum potassium between 4 and 5~mEq/L) from the ECG alone. We compared training with ECGs and potassium measurements filtered to be within 1 hour, 30 minutes, and 15 minutes of each other. We explored scenarios that both leveraged all available data at each time cutoff as well as restricted data to match training set sizes across the time cutoffs. For each case, we trained five separate instances of our neural network to account for variability.

The 1 hour cutoff with all data resulted in an average area under the receiver operator curve (AUC) of 0.850 and a weighted accuracy of 76.3%, 15 minutes resulted in 0.814, 72.5%, and 30 minutes. Truncating the training sets to the same size as the 15 minute cutoff results in comparable average accuracy and ACU for all.

Contrary to expectation, the theoretically more difficult task of potassium classification within 1 hour of ECG produced comparable results to prediction within 15 minutes when training set size was controlled. With expanded training set size, the 1 hour classification performance improved, as would be expected from other ML studies. Our future studies will continue to explore the performance of ML potassium predictions through investigations of failure cases, identification of biases, and explainability analyses.