Machine Learning Consensus Clustering Approach for Hospitalized Patients with Dysmagnesemia

Diagnostics (Basel). 2021 Nov 15;11(11):2119. doi: 10.3390/diagnostics11112119.

Abstract

Background: The objectives of this study were to classify patients with serum magnesium derangement on hospital admission into clusters using unsupervised machine learning approach and to evaluate the mortality risks among these distinct clusters.

Methods: Consensus cluster analysis was performed based on demographic information, principal diagnoses, comorbidities, and laboratory data in hypomagnesemia (serum magnesium ≤ 1.6 mg/dL) and hypermagnesemia cohorts (serum magnesium ≥ 2.4 mg/dL). Each cluster's key features were determined using the standardized mean difference. The associations of the clusters with hospital mortality and one-year mortality were assessed.

Results: In hypomagnesemia cohort (n = 13,320), consensus cluster analysis identified three clusters. Cluster 1 patients had the highest comorbidity burden and lowest serum magnesium. Cluster 2 patients had the youngest age, lowest comorbidity burden, and highest kidney function. Cluster 3 patients had the oldest age and lowest kidney function. Cluster 1 and cluster 3 were associated with higher hospital and one-year mortality compared to cluster 2. In hypermagnesemia cohort (n = 4671), the analysis identified two clusters. Compared to cluster 1, the key features of cluster 2 included older age, higher comorbidity burden, more hospital admissions primarily due to kidney disease, more acute kidney injury, and lower kidney function. Compared to cluster 1, cluster 2 was associated with higher hospital mortality and one-year mortality.

Conclusion: Our cluster analysis identified clinically distinct phenotypes with differing mortality risks in hospitalized patients with dysmagnesemia. Future studies are required to assess the application of this ML consensus clustering approach to care for hospitalized patients with dysmagnesemia.

Keywords: artificial intelligence; clustering; consensus clustering; dysmagnesemia; electrolytes; hypermagnesemia; hypomagnesemia; individualized medicine; machine learning; magnesium; mortality; nephrology; personalized medicine; precision medicine.