Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2021 Nov 15;11(11):2119.
doi: 10.3390/diagnostics11112119.

Machine Learning Consensus Clustering Approach for Hospitalized Patients with Dysmagnesemia

Affiliations

Machine Learning Consensus Clustering Approach for Hospitalized Patients with Dysmagnesemia

Charat Thongprayoon et al. Diagnostics (Basel). .

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.

PubMed Disclaimer

Conflict of interest statement

The authors declare no conflict of interest.

Figures

Figure 1
Figure 1
(A) Cumulative distribution function (CDF) plot displaying consensus distributions for each cluster (k) for patients with hypomagnesemia; (B) Delta area plot reflecting the relative changes in the area under the CDF curve for hypomagnesemia. (C) CDF plot displaying consensus distributions for each cluster (k) for patients with hypermagnesemia; (D) Delta area plot reflecting the relative changes in the area under the CDF curve for hypermagnesemia.
Figure 2
Figure 2
(A) Consensus matrix heat map depicting consensus values on a white to blue color scale of each cluster (k) for patients with hypomagnesemia; (B) Consensus matrix heat map depicting consensus values on a white to blue color scale of each cluster (k) for patients with hypermagnesemia.
Figure 3
Figure 3
(A) The bar plot represents the mean consensus score for different numbers of clusters (K ranges from two to ten) for patients with hypomagnesemia; (B) The bar plot represents the mean consensus score for different numbers of clusters (K ranges from two to ten) for patients with hypermagnesemia.
Figure 4
Figure 4
The standardized differences across three clusters for each of baseline parameters for patients with hypomagnesemia and hypermagnesemia. The x-axis represents the standardized differences value, and the y axis represents baseline variables. The dashed vertical lines signify the standardized differences cutoffs of <−0.3 or >0.3. Abbreviations: AG, anion gap; AKI, acute kidney injury; BMI, body mass index; CHF, congestive heart failure; Cl, chloride; COPD, chronic obstructive pulmonary disease; CVA, cerebrovascular accident; DM, diabetes mellitus; ESKD, end stage kidney disease; GFR, glomerular filtration rate; GI, gastrointestinal; Hb, hemoglobin; HCO3, bicarbonate; K, potassium; ID, infectious disease; MI, myocardial infarction; Na, sodium; PVD, peripheral vascular disease; RS, respiratory system; SID, strong ion difference.
Figure 5
Figure 5
(A) Hospital mortality and (B) One-year mortality among different clusters of admission hypomagnesemia; (C) Hospital mortality and (D) One-year mortality among different clusters of admission hypermagnesemia.

References

    1. Glasdam S.M., Glasdam S., Peters G.H. The Importance of Magnesium in the Human Body: A Systematic Literature Review. Adv. Clin. Chem. 2016;73:169–193. doi: 10.1016/bs.acc.2015.10.002. - DOI - PubMed
    1. Cheungpasitporn W., Thongprayoon C., Kittanamongkolchai W., Srivali N., Edmonds P.J., Ungprasert P., O’Corragain O.A., Korpaisarn S., Erickson S.B. Proton pump inhibitors linked to hypomagnesemia: A systematic review and meta-analysis of observational studies. Ren. Fail. 2015;37:1237–1241. doi: 10.3109/0886022X.2015.1057800. - DOI - PubMed
    1. Cheungpasitporn W., Thongprayoon C., Mao M.A., Srivali N., Ungprasert P., Varothai N., Sanguankeo A., Kittanamongkolchai W., Erickson S.B. Hypomagnesaemia linked to depression: A systematic review and meta-analysis. Intern. Med. J. 2015;45:436–440. doi: 10.1111/imj.12682. - DOI - PubMed
    1. Qu X., Jin F., Hao Y., Li H., Tang T., Wang H., Yan W., Dai K. Magnesium and the risk of cardiovascular events: A meta-analysis of prospective cohort studies. PLoS ONE. 2013;8:e57720. doi: 10.1371/journal.pone.0057720. - DOI - PMC - PubMed
    1. de Baaij J.H., Hoenderop J.G., Bindels R.J. Magnesium in man: Implications for health and disease. Physiol. Rev. 2015;95:1–46. doi: 10.1152/physrev.00012.2014. - DOI - PubMed

LinkOut - more resources