| Objective: Hyperkalemia is one of the most common electrolyte disorders in the clinic,with a higher prevalence in patients with end-stage renal disease(ESRD).Hyperkalemia has variable symptoms and is prone to missed misdiagnosis,while severe hyperkalemia can lead to the occurrence of adverse events such as arrhythmia or even sudden death in patients.Increasing the frequency of detection of serum potassium concentration is beneficial for timely detection of hyperkalemia and early intervention in case of serious adverse events.Therefore,this study aimed to utilize multiple different machine learning methods to continue to predict different degrees of hyperkalemia by analyzing different features on multiple leads in the electrocardiogram(ECG),and to visually analyze the features in the machine learning model to clearly identify ECG features that have a greater impact on model output outcomes.Methods: Patients who were scheduled to receive standard hemodialysis at the Affiliated Hospital of Qingdao University between December 2020 and December 2021 were used as study subjects,and the electrocardiographic and serum potassium concentration data of the patients were collected.A total of 16 kinds and 64 features including slope class,amplitude class,area class and time class on leads V2~V5 in ECG were extracted.Features were filtered using recurrent feature elimination(RFE).All samples were analyzed using light gradient boosting machine(LGBM),Na?ve Byes(NB)classifiers,random forest(RF),Knearest neighbors(KNN)Seven machine learning methods,support vector machine(SVM)and logistic regression(LR),were used to model the prediction of hyperkalemia of different degrees above 5.0,5.5,6.0mmol/L,respectively.The accuracy of the model was evaluated by the area under the Area under the receiver operating characteristic curve(AUC)and served as the primary evaluation metric for comparisons between models.The model with the highest AUC evaluated the clinical usefulness of the model with a decision curve analysis(DCA)curve.The features in the predictive model whose AUC was optimal were visually analyzed using the SHAP(Shapley additive expansion,SHAP)method.Results: From December 2020 to December 2021,80 patients were included for data collection,and a total of 1024 person-times of ECG and blood potassium concentration matching data were collected.The 80 patients included 50 males and 30 females,with an average age of 53.7 years.Serum potassium concentration and ECG data of 1024 groups included in this study.There were 576 cases with blood potassium concentration less than5.0 mmol/L,173 cases with blood potassium concentration between 5.0 and 5.5 mmol/L,136 cases with blood potassium concentration between 5.5 and 6.0 mmol/L,and 139 cases with blood potassium concentration above 6.0 mmol/L;When 5.0 mmol/L was used as the concentration threshold of hyperkalemia,the prevalence of hyperkalemia was 43.8%;When 5.5mmol/L was used as the concentration threshold of hyperkalemia,the prevalence rate was 26.9%;The prevalence of hyperkalemia with blood potassium concentration higher than 6.0 mmol/L was 13.6%.The absolute values of the left and right slopes of the T wave on the ECG were greater in patients with p H ≥ 5.0mmol/L,5.5mmol/L,or ≥6.0mmol/L than in patients with normal serum potassium(P < 0.001);And patients with hyperkalemia had more depressed R-waves and larger amplitudes and T-wave areas in their ECGs(P < 0.001);In terms of time class characteristics,PR interval in ECG was longer in hyperkalemic patients(P < 0.001).When models were trained using 13,10 and 10 ECG features in predicting hyperkalemia at or above 5.0mmol/L,5.5mmol/L and 6.0mmol/L,respectively,both a higher AUC and the ability to refine the model the most.In predicting hyperkalemia with serum potassium concentrations above 5.0mmol/L,the AUCs of the models varied from 0.760 to 0.903,with LGBM showing the highest AUC of 0.903;In predicting hyperkalemia with serum potassium concentrations above 5.5mmol/L,the AUCs of the individual models ranged from 0.701 to 0.904,with LGBM having the highest AUC of 0.904;In predicting hyperkalemia with serum potassium concentrations above6.0mmol/L,the AUCs of the models varied from 0.633 to 0.983,and the model with the highest AUC,still LGBM,was 0.983.The DCA curve suggested that LGBM was clinically useful in predicting these three degrees of hyperkalemia.The results of the visibility analysis of the model using the shape method suggest that LGBM,when predicting three different degrees of hyperkalemia,has the greatest impact on the model output results,mostly with regard to T-wave characteristics,that is,T wave right slope or left slope.Conclusions: Using a machine learning approach,it is feasible to make an noninvasive,rapid prediction of hyperkalemia by analyzing specific features on the ECG.LGBM performed better in predicting different degrees of hyperkalemia with better clinical utility.T wave right slope and T wave left slope were significant predictors for predicting different degrees of hyperkalemia,and increasing absolute values of the slopes guided the model to output positive results. |