<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.0 20040830//EN" "journalpublishing.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="2.0" xml:lang="en" article-type="research-article"><front><journal-meta><journal-id journal-id-type="nlm-ta">JMIR Med Inform</journal-id><journal-id journal-id-type="publisher-id">medinform</journal-id><journal-id journal-id-type="index">7</journal-id><journal-title>JMIR Medical Informatics</journal-title><abbrev-journal-title>JMIR Med Inform</abbrev-journal-title><issn pub-type="epub">2291-9694</issn><publisher><publisher-name>JMIR Publications</publisher-name><publisher-loc>Toronto, Canada</publisher-loc></publisher></journal-meta><article-meta><article-id pub-id-type="publisher-id">v13i1e71229</article-id><article-id pub-id-type="doi">10.2196/71229</article-id><article-categories><subj-group subj-group-type="heading"><subject>Original Paper</subject></subj-group></article-categories><title-group><article-title>A Machine Learning&#x2013;Based Prognostication Model Enhances Prediction of Early Hepatic Encephalopathy in Patients With Noncancer-Related Cirrhosis: Multicenter Longitudinal Cohort Study in Taiwan</article-title></title-group><contrib-group><contrib contrib-type="author"><name name-style="western"><surname>Chen</surname><given-names>Hsin-Yu</given-names></name><degrees>MD</degrees><xref ref-type="aff" rid="aff1">1</xref></contrib><contrib contrib-type="author"><name name-style="western"><surname>Cheng</surname><given-names>Yiu-Hua</given-names></name><degrees>MD</degrees><xref ref-type="aff" rid="aff1">1</xref><xref ref-type="aff" rid="aff2">2</xref></contrib><contrib contrib-type="author"><name name-style="western"><surname>Yeh</surname><given-names>Wei-Chung</given-names></name><degrees>MD</degrees><xref ref-type="aff" rid="aff1">1</xref><xref ref-type="aff" rid="aff2">2</xref></contrib><contrib contrib-type="author"><name name-style="western"><surname>Chen</surname><given-names>Yi-Chuan</given-names></name><degrees>MD</degrees><xref ref-type="aff" rid="aff2">2</xref><xref ref-type="aff" rid="aff3">3</xref><xref ref-type="aff" rid="aff4">4</xref></contrib><contrib contrib-type="author" corresp="yes"><name name-style="western"><surname>Tsai</surname><given-names>Yi-Wen</given-names></name><degrees>MD</degrees><xref ref-type="aff" rid="aff2">2</xref><xref ref-type="aff" rid="aff3">3</xref><xref ref-type="aff" rid="aff4">4</xref><xref ref-type="aff" rid="aff5">5</xref></contrib></contrib-group><aff id="aff1"><institution>Department of Family Medicine, Keelung Chang Gung Memorial Hospital</institution><addr-line>Keelung</addr-line><country>Taiwan</country></aff><aff id="aff2"><institution>School of Medicine, College of Medicine, Chang Gung University</institution><addr-line>Taoyuan</addr-line><country>Taiwan</country></aff><aff id="aff3"><institution>Department of Family Medicine, New Taipei Municipal TuCheng Hospital</institution><addr-line>New Taipei</addr-line><country>Taiwan</country></aff><aff id="aff4"><institution>Department of Family Medicine, Linkou Chang Gung Memorial Hospital</institution><addr-line>5 Fuxing Street, Guishan District</addr-line><addr-line>Taoyuan</addr-line><country>Taiwan</country></aff><aff id="aff5"><institution>Graduate Institute of Medical Sciences, College of Medicine, National Defense Medical University</institution><addr-line>Taipei</addr-line><country>Taiwan</country></aff><contrib-group><contrib contrib-type="editor"><name name-style="western"><surname>Benis</surname><given-names>Arriel</given-names></name></contrib></contrib-group><contrib-group><contrib contrib-type="reviewer"><name name-style="western"><surname>Lin</surname><given-names>Huapeng</given-names></name></contrib><contrib contrib-type="reviewer"><name name-style="western"><surname>Soldera</surname><given-names>Jonathan</given-names></name></contrib></contrib-group><author-notes><corresp>Correspondence to  Yi-Wen Tsai, MD, Department of Family Medicine, Linkou Chang Gung Memorial Hospital, 5 Fuxing Street, Guishan District, Taoyuan, Taiwan, 886 33281200 ext 2482; <email>tsaiyiwen@gmail.com</email></corresp></author-notes><pub-date pub-type="collection"><year>2025</year></pub-date><pub-date pub-type="epub"><day>6</day><month>8</month><year>2025</year></pub-date><volume>13</volume><elocation-id>e71229</elocation-id><history><date date-type="received"><day>21</day><month>01</month><year>2025</year></date><date date-type="rev-recd"><day>13</day><month>06</month><year>2025</year></date><date date-type="accepted"><day>16</day><month>06</month><year>2025</year></date></history><copyright-statement>&#x00A9; Hsin-Yu Chen, Yiu-Hua Cheng, Wei-Chung Yeh, Yi-Chuan Chen, Yi-Wen Tsai. Originally published in JMIR Medical Informatics (<ext-link ext-link-type="uri" xlink:href="https://medinform.jmir.org">https://medinform.jmir.org</ext-link>), 6.8.2025. </copyright-statement><copyright-year>2025</copyright-year><license license-type="open-access" xlink:href="https://creativecommons.org/licenses/by/4.0/"><p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (<ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</ext-link>), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in JMIR Medical Informatics, is properly cited. The complete bibliographic information, a link to the original publication on <ext-link ext-link-type="uri" xlink:href="https://medinform.jmir.org/">https://medinform.jmir.org/</ext-link>, as well as this copyright and license information must be included.</p></license><self-uri xlink:type="simple" xlink:href="https://medinform.jmir.org/2025/1/e71229"/><abstract><sec><title>Background</title><p>Hepatic encephalopathy (HE) contributes significantly to mortality among patients with liver cirrhosis. Early prediction of HE is essential for clinical decision-making, yet remains challenging&#x2014;particularly in noncancer-related cirrhosis due to the unpredictable disease course.</p></sec><sec><title>Objective</title><p>This study aimed to develop a novel machine learning (ML) model to improve early prediction of HE in patients with noncancer-related cirrhosis.</p></sec><sec sec-type="methods"><title>Methods</title><p>A multicenter, retrospective cohort study was conducted from January 2010 to December 2017 across all Chang Gung Memorial Hospital branches in northern, middle, and southern Taiwan. We applied several ML models to evaluate HE predictability and compared their performance in the training dataset and testing dataset. Optimal sensitivity and specificity were determined using the Youden index. The best ML model was interpreted by the Shapley Additive Explanations plot.</p></sec><sec sec-type="results"><title>Results</title><p>A total of 5878 patients with cirrhosis were included in the analysis, of whom 1187 (20.2%) subsequently developed HE. Compared to the non-HE group, patients with HE were older (median age 55, IQR 46&#x2010;65 vs median age 54, IQR 44&#x2010;66 years; <italic>P</italic>=.04) and had higher rates of hepatitis B virus infection (351/1187, 30% vs 961/4691, 20.5%; <italic>P</italic>&#x003C;.001), alcohol use (540/1187, 45.5% vs 1512/4691, 32.2%; <italic>P</italic>&#x003C;.001), sepsis (393/1187, 33.1% vs 792/4691, 16.9%; <italic>P</italic>&#x003C;.001), and mortality (425/1187, 35.8% vs 502/4691, 10.7%; <italic>P</italic>&#x003C;.001), along with distinct laboratory abnormalities reflecting liver dysfunction. Among the ML algorithms evaluated, the extreme gradient boosting algorithm demonstrated the highest predictive accuracy, achieving an area under the curve (AUC) of 0.86 (95% CI 0.83&#x2010;0.88) in the testing dataset. This performance was significantly superior to that of the neural network (AUC 0.79, 95% CI 0.76&#x2010;0.81; <italic>P</italic>&#x003C;.001), support vector machine (AUC 0.77, 95% CI 0.73&#x2010;0.80; <italic>P</italic>&#x003C;.001), and the model for end-stage liver disease score (AUC 0.74, 95% CI 0.71&#x2010;0.77; <italic>P</italic>&#x003C;.001). Using a probability threshold of 0.25, the extreme gradient boosting model demonstrated a sensitivity of 72% (95% CI 0.67&#x2010;0.77), specificity of 80% (95% CI 0.78&#x2010;0.82), a positive predictive value of 48% (95% CI 43-53), and a negative predictive value of 92% (95% CI 90-94) in the testing set. Comparable performance was observed in the training dataset, with a sensitivity of 80% (95% CI 0.77&#x2010;0.83), specificity of 81% (95% CI 0.80&#x2010;0.82), and a negative predictive value of 94% at the same threshold. The most influential predictive variables identified by the model included serum ammonia, aspartate transaminase, alanine transaminase, prothrombin time, and serum potassium.</p></sec><sec sec-type="conclusions"><title>Conclusions</title><p>We developed a novel ML model for predicting HE in patients with noncancer-related cirrhosis. This model provides a practical guide to help physicians and these patients in shared decision-making regarding treatment strategy, with the ultimate goal of improving clinical care and reducing the burden of HE-related morbid complications.</p></sec></abstract><kwd-group><kwd>hepatic encephalopathy</kwd><kwd>machine learning model</kwd><kwd>cirrhosis</kwd><kwd>noncancer-related liver diseases</kwd><kwd>prognostication</kwd></kwd-group></article-meta></front><body><sec id="s1" sec-type="intro"><title>Introduction</title><p>Complications of chronic liver cirrhosis affect millions of individuals worldwide, which causes a tremendous burden and health expenditure for these patients and their families [<xref ref-type="bibr" rid="ref1">1</xref>,<xref ref-type="bibr" rid="ref2">2</xref>]. Among these cirrhosis-related complications, hepatic encephalopathy (HE) has emerged as a severe neuropsychiatric manifestation contributing to substantial morbidity and mortality, increased hospitalization, medical costs, readmission rates, and impaired health-related quality of life [<xref ref-type="bibr" rid="ref1">1</xref>-<xref ref-type="bibr" rid="ref5">5</xref>]. HE represents a major clinical concern for physicians to necessitate timely intervention and to monitor and mitigate the adverse outcomes in patients with cirrhosis. However, the current sensitivity and specificity of diagnostic tools used in HE vary depending on the different testing methods used across studies and settings [<xref ref-type="bibr" rid="ref6">6</xref>,<xref ref-type="bibr" rid="ref7">7</xref>]. Additionally, due to the diverse stages and unpredictable trajectories in patients with cirrhosis, formidable challenges in disease management and prognostication remain critical for clinicians to resolve, especially for patients with noncancer-related cirrhosis [<xref ref-type="bibr" rid="ref6">6</xref>].</p><p>Etiologies of noncancer-related cirrhosis vary, including hepatitis B virus (HBV) and hepatitis C virus (HCV) infection, alcohol-related liver disease, and nonalcoholic steatohepatitis. A global statistics estimation revealed a higher prevalence of noncancer-related cirrhosis than that of cancer-related cirrhosis [<xref ref-type="bibr" rid="ref1">1</xref>]. Moreover, a recent longitudinal analysis from National Health Research Institutes data in Taiwan between 2000 and 2017 reported only about 14.2% palliative resource use in the year prior to death in patients with noncancer-related terminal disease compared with 60.9% use in patients with terminal cancer in 2017 [<xref ref-type="bibr" rid="ref8">8</xref>], which highlights that the use of palliative care services within the year preceding death in patients with a noncancer-related terminal illness was far less than that in patients with cancer-related terminal illness. The National Health Insurance system in Taiwan is a nationwide program launched by the Taiwanese government that covers over 96% of Taiwan&#x2019;s population registered in the census for over 6 months. The administrative datasets are maintained electronically by the National Health Research Institutes and the National Health Insurance Administration of Taiwan [<xref ref-type="bibr" rid="ref9">9</xref>-<xref ref-type="bibr" rid="ref11">11</xref>]. Patients with end-stage liver disease (ESLD) without hepatocellular carcinoma are significantly less likely to receive inpatient specialist palliative care and to have a lower use rate compared with those with hepatocellular carcinoma [<xref ref-type="bibr" rid="ref12">12</xref>,<xref ref-type="bibr" rid="ref13">13</xref>]. The distress and extreme pain experienced by patients with noncancer-related ESLD is comparable to that of individuals with cancer-related terminal illnesses such as lung and colon cancer [<xref ref-type="bibr" rid="ref14">14</xref>]. However, given the complexities of the etiology and unpredictability of disease trajectories in patients with noncancer cirrhosis, these gaps in unmet clinical needs between patients with cancer and noncancer-related cirrhosis underscore the importance of the early recognition and prognosis of cirrhosis complications, such as HE. Taken together, these data emphasize the fact that the need for prognostication and early prediction for incident HE in patients with noncancer-related cirrhosis is important.</p><p>Despite advances in medical therapeutics and supportive care, the accurate prediction and early detection of HE remain a formidable clinical task. Traditional prognostic tools, such as the model for end-stage liver disease (MELD) score, offer valuable insights into disease severity and prognosis but lack the predictive accuracy needed for optimal clinical decision-making [<xref ref-type="bibr" rid="ref6">6</xref>]. Moreover, MELD scores do not account for factors such as inflammation, ammonia levels, or other metabolic disturbances. Furthermore, tests for HE that rely on psychometric performance can be directly influenced by social determinants of health, smoking, diabetes, and alcohol use, which are factors that can vary by region [<xref ref-type="bibr" rid="ref7">7</xref>].</p><p>Machine learning (ML) algorithms have emerged as promising tools for predictive modeling and risk stratification in complex medical conditions. By leveraging vast datasets and advanced computational techniques, ML algorithms have the potential to identify subtle patterns and predictive features that may elude traditional statistical methodologies.</p><p>In this study, we aimed to develop a novel ML approach model to enhance the prognostication and early prediction of incident HE in patients with noncancer-related cirrhosis with the goal to help physicians in shared decision-making for treatment strategy as well as to improve patient care and reduce their distress from morbid complications.</p></sec><sec id="s2" sec-type="methods"><title>Methods</title><sec id="s2-1"><title>Study Design and Participants</title><p>We conducted a multicenter retrospective cohort study involving 8615 patients diagnosed with liver cirrhosis from 3 academic medical centers and 5 community hospitals (Taipei, Linkou, Keelung, Taoyuan, Chiayi, Kaohsiung, Lovers Lake, and Yunlin) of Chang Gung Memorial Medical Foundation in northern, middle, and southern Taiwan between 2010 and 2017. Datasets were collected from the electronic medical record (EMR) system built by the Chang Gung Medical Foundation. Patients with chronic liver disease with more than 2 visits in the EMR system who were diagnosed with cirrhosis defined using the International Classification of Diseases (ICD)-9 and ICD-10 codes (Table S1 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>) by clinical physicians with or without ESLD-related complications, such as HE, hepatorenal syndrome, ascites, spontaneous bacterial peritonitis, and esophageal varices, were enrolled. HE was defined as having ICD-9 code 572.2 and ICD-10 codes K76.82, B15.0, B16.0, B16.2, B19.0, G93.4, and G94.3 recorded in the EMR system. The exclusion criteria were patients who were younger than 18 years of age, those who had been diagnosed with malignant neoplasms of the liver (ICD-9 code: 155.0 or ICD-10 code: C22-C22.09) or HE at the time of enrollment, or those who had only a one-time-visit record before being lost to follow-up.</p></sec><sec id="s2-2"><title>Ethical Considerations</title><p>This study was conducted in accordance with the ethical standards of the Declaration of Helsinki, and the protocol was approved by the ethics institutional review board of Chang Gung Memorial Hospital, Taiwan (approval: 201801291B0C504). The institutional review board approved the waiver of informed consent because of the deidentification of all health data collected from the EMR system. The data were collected from patients treated at Chang Gung Memorial Hospital between 2010 and 2017.</p></sec><sec id="s2-3"><title>Data Collection and Definitions</title><p>Datasets were collected from the EMR system. Individuals meeting the inclusion criteria and whose laboratory data were available within enrollment were included in this study. The laboratory measurements collected for ML included prothrombin time (PT), activated partial thromboplastin time, the international normalized ratio (INR), C-reactive protein (CRP), albumin, ammonia, alanine transaminase (ALT), aspartate transaminase (AST), serum bilirubin, &#x03B3;-glutamyl transferase, serum bilirubin, creatinine, blood urea nitrogen (BUN), sodium (Na), potassium (K), lactate, uric acid, total cholesterol, triglyceride, fasting plasma glucose, high-density lipoprotein cholesterol levels, low-density lipoprotein cholesterol levels, white blood count, red blood cell, hemoglobin, and platelet. The MELD score was calculated according to the following formula [<xref ref-type="bibr" rid="ref15">15</xref>]: 3.78&#x00D7;log<sub>e</sub>(bilirubin [mg/dL])+11.2&#x00D7;log<sub>e</sub>(INR)+9.57&#x00D7;log<sub>e</sub>(creatinine [mg/dL])+6.43.</p></sec><sec id="s2-4"><title>Data Preprocessing and ML Modeling</title><p>This study followed the TRIPOD (Transparent Reporting of a Multivariable Prediction Model for Individual Prognosis or Diagnosis) reporting guidelines to ensure methodological transparency and reproducibility. A completed TRIPOD checklist is provided as <xref ref-type="supplementary-material" rid="app2">Checklist 1</xref>. The datasets were randomly divided into training and testing datasets at a 3:1 ratio. We implemented random forest (RF), neural network, support vector machine (SVM), and extreme gradient boosting (XGBoost) for modeling in the training dataset. The models were built and evaluated using R (version 4.0.1; R Foundation for Statistical Computing) with the <italic>xgboost</italic> package (version 1.4.2). The testing dataset was performed for internal validation. Missing data were addressed through median imputation, where the median value was used to replace any unavailable or null value. Model training was completed in 2024 based on structured clinical data from EMR records.</p><p>The prediction target was the probability of developing HE, with the model output ranging from 0 to 1. This continuous output was transformed into a binary classification.</p><p>Model training used 10-fold cross-validation with hyperparameter tuning, but no alignment strategies (such as reinforcement learning or preference optimization) were used. Inference was based on structured variable inputs, and no text generation, prompt engineering, or large language models were involved in the modeling process.</p></sec><sec id="s2-5"><title>Feature Selection and Imbalanced Data</title><p>To identify significant candidate features while eliminating noisy or redundant ones that could lead to an inefficient, impractical, or overfitting model, we used a wrapper method using the Boruta algorithm to rank the predictive features of HE. For practical purposes, we repeated the Boruta algorithm 300 times and selected the top 20 ranked features. To avoid the bias toward the majority class and enhance the overall accuracy and performance of the model, we used the synthetic minority over-sampling technique for imbalanced datasets.</p></sec><sec id="s2-6"><title>Performance Evaluation and Interpretation</title><p>We assessed the area under the receiver operating characteristic curve (AUC-ROC) to discriminate the performance of the ML models. We further adopted the Youden index to evaluate the best corresponding cutoff sensitivities and specificities for the optimal performance of the ML algorithm. Then, we analyzed the model using the Shapley Additive Explanations (SHAP) plot to disclose the impact of the features on the output of the model prediction.</p></sec><sec id="s2-7"><title>Statistical Analysis</title><p>Continuous variables were expressed as the median (IQR), and categorical variables by frequencies and percentages. ML modeling was performed using the statistical software package R (version 4.0.1) with the <italic>Boruta</italic> [<xref ref-type="bibr" rid="ref16">16</xref>] and <italic>Caret</italic> packages [<xref ref-type="bibr" rid="ref17">17</xref>]. Prediction models were compared using R with the DeLong method of the <italic>pROC</italic> package [<xref ref-type="bibr" rid="ref18">18</xref>]. All statistic assessments were evaluated at a 2-sided &#x03B1; level of .05.</p></sec></sec><sec id="s3" sec-type="results"><title>Results</title><sec id="s3-1"><title>Overview</title><p>A total of 8615 consecutive patients who had been diagnosed as cirrhosis, with or without ESLD-related complications, were enrolled in this study. These patients were identified from the EMR system in 3 academic medical centers and 5 community hospitals of Chang Gung Memorial Medical Foundation in Taiwan, between January 1, 2010, and December 31, 2017. After applying the exclusion criteria&#x2014;including patients with fewer than 2 visits, those younger than 18 years of age, and those with liver cancer&#x2014;5878 patients with cirrhosis were eligible for analysis, including 1187 with HE and 4691 without HE. <xref ref-type="fig" rid="figure1">Figure 1</xref> shows a flowchart of the enrollment process.</p><fig position="float" id="figure1"><label>Figure 1.</label><caption><p>Flowchart of the enrollment process. ICD: International Classification of Diseases; CGMH: Chang Gung Memorial Hospital; XGBoost: extreme gradient boosting.</p></caption><graphic alt-version="no" mimetype="image" position="float" xlink:type="simple" xlink:href="medinform_v13i1e71229_fig01.png"/></fig></sec><sec id="s3-2"><title>Baseline Characteristics of the HE and Non-HE Groups in Patients With Noncancer-Related Liver Cirrhosis</title><p>The median age was slightly older in the HE group compared to the non-HE group (median 55, IQR 46-65 vs median 54, IQR 44-66 years; <italic>P</italic>=.04). There were no significant differences in sex or HCV infection between the groups. Specifically, 845 of 1187 (71.2%) patients in the HE group and 3227 of 4691 (68.8%) in the non-HE group were male, 342 of 1187 (28.8%) patients in the HE group and 1464 of 4691 (31.2%) in the non-HE group were female (<italic>P</italic>=.11). HCV infection was present in 211 of 1187 (17.8%) and 882 of 4691 (18.8%) patients in the HE and non-HE groups, respectively (<italic>P</italic>=.40). In contrast, the prevalence of HBV infection was higher in the HE group (351/1187, 30%) than in the non-HE group (961/4691, 20.5%; <italic>P</italic>&#x003C;.001). Alcohol use was reported in 540 of 1187 (45.5%) patients with HE versus 1512 of 4691 (32.2%) patients without HE (<italic>P</italic>&#x003C;.001). Sepsis occurred in 393 of 1187 (33.1%) patients with HE compared to 793 of 4691 (16.9%) without HE (<italic>P</italic>&#x003C;.001). Mortality was also significantly higher in the HE group, with 425 (35.8%) deaths versus 502 (10.7%) deaths in the non-HE group (<italic>P</italic>&#x003C;.001). In laboratory comparisons, patients in the HE group had significantly lower platelet counts, prolonged PT, activated partial thromboplastin time, and INR, higher serum levels of white blood count, ALT, AST, total bilirubin, direct bilirubin, &#x03B3;-glutamyl transferase, ammonia, lactate, BUN, and creatinine, and lower levels of serum albumin, potassium, sodium, total cholesterol, high-density lipoprotein, and hemoglobin. No significant differences were observed in serum uric acid, low-density lipoprotein cholesterol, or blood sugar levels between the 2 groups.</p><p>Overall, in our multicenter retrospective longitudinal analysis, the HE group showed a greater tendency to have coagulopathy, hepatorenal syndrome, and hypoalbuminuria, which may have been the result of malnutrition or sarcopenia in the patients with noncancer-related liver cirrhosis. The baseline demographic and laboratory characteristics between the HE and non-HE groups are shown in <xref ref-type="table" rid="table1">Table 1</xref>.</p><table-wrap id="t1" position="float"><label>Table 1.</label><caption><p>Comparisons of baseline characteristics between non-HE<sup><xref ref-type="table-fn" rid="table1fn1">a</xref></sup> and HE groups (n=5878).</p></caption><table id="table1" frame="hsides" rules="groups"><thead><tr><td align="left" valign="bottom">Characteristics</td><td align="left" valign="bottom">HE (n=1187)</td><td align="left" valign="bottom">Non-HE (n=4691)</td><td align="left" valign="bottom"><italic>P</italic> value<sup><xref ref-type="table-fn" rid="table1fn2">b</xref></sup><sup>,</sup><sup><xref ref-type="table-fn" rid="table1fn3">c</xref></sup></td></tr></thead><tbody><tr><td align="left" valign="top">Age (years), median (IQR)</td><td align="left" valign="top">55 (46-65)</td><td align="left" valign="top">54 (44-66)</td><td align="left" valign="top">.04</td></tr><tr><td align="left" valign="top" colspan="3">Sex, n (%)</td><td align="left" valign="top">.11</td></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content> Female</td><td align="left" valign="top">342 (28.8)</td><td align="left" valign="top">1464 (31.2)</td><td align="left" valign="top"/></tr><tr><td align="left" valign="top"><named-content content-type="indent">&#x00A0;&#x00A0;&#x00A0;&#x00A0;</named-content> Male</td><td align="left" valign="top">845 (71.2)</td><td align="left" valign="top">3227 (68.8)</td><td align="left" valign="top"/></tr><tr><td align="left" valign="top">Sepsis, n (%)</td><td align="left" valign="top">393 (33.1)</td><td align="left" valign="top">792 (16.9)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Hepatitis B virus, n (%)</td><td align="left" valign="top">351 (30)</td><td align="left" valign="top">961 (20.5)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Hepatitis C virus, n (%)</td><td align="left" valign="top">211 (17.8)</td><td align="left" valign="top">882 (18.8)</td><td align="left" valign="top">.40</td></tr><tr><td align="left" valign="top">Alcohol use, n (%)</td><td align="left" valign="top">540 (45.5)</td><td align="left" valign="top">1512 (32.2)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Death, n (%)</td><td align="left" valign="top">425 (35.8)</td><td align="left" valign="top">502 (10.7)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">International normalized ratio, median (IQR)</td><td align="left" valign="top">1.56 (1.30-2.00)</td><td align="left" valign="top">1.20 (1.10-1.46)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Prothrombin time, median (IQR)</td><td align="left" valign="top">16.5 (13.7-21.2)</td><td align="left" valign="top">13.1 (11.4-15.7)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Activated partial thromboplastin time, median (IQR)</td><td align="left" valign="top">40 (33-52)</td><td align="left" valign="top">31 (29-37)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">C-reactive protein, median (IQR)</td><td align="left" valign="top">22 (10-46)</td><td align="left" valign="top">17 (4-53)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Albumin, median (IQR)</td><td align="left" valign="top">2.60 (2.30-2.90)</td><td align="left" valign="top">3.00 (2.50-3.64)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Alanine transaminase, median (IQR)</td><td align="left" valign="top">37 (23-66)</td><td align="left" valign="top">31 (19-54)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Aspartate transaminase, median (IQR)</td><td align="left" valign="top">73 (45-131)</td><td align="left" valign="top">48 (29-90)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Total bilirubin, median (IQR)</td><td align="left" valign="top">4 (2-12)</td><td align="left" valign="top">1 (1-3)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Direct bilirubin, median (IQR)</td><td align="left" valign="top">3.4 (0.9-10.9)</td><td align="left" valign="top">0.3 (0.2-1.0)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">&#x03B3;-Glutamyl transferase, median (IQR)</td><td align="left" valign="top">66 (32-153)</td><td align="left" valign="top">60 (21-163)</td><td align="left" valign="top">.02</td></tr><tr><td align="left" valign="top">Ammonia, median (IQR)</td><td align="left" valign="top">129 (91-182)</td><td align="left" valign="top">99 (72-138)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Blood urea nitrogen, median (IQR)</td><td align="left" valign="top">20 (11-42)</td><td align="left" valign="top">15 (10-24)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Creatinine, median (IQR)</td><td align="left" valign="top">0.97 (0.63-1.83)</td><td align="left" valign="top">0.82 (0.62-1.18)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Lactate, median (IQR)</td><td align="left" valign="top">23 (16-45)</td><td align="left" valign="top">18 (12-48)</td><td align="left" valign="top">.004</td></tr><tr><td align="left" valign="top">Sodium, median (IQR)</td><td align="left" valign="top">138.0 (134.0-141.0)</td><td align="left" valign="top">139.0 (136.0-141.0)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Potassium, median (IQR)</td><td align="left" valign="top">3.60 (3.10-4.10)</td><td align="left" valign="top">3.80 (3.40-4.20)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Uric acid, median (IQR)</td><td align="left" valign="top">5.50 (3.48-8.20)</td><td align="left" valign="top">6.00 (4.60-7.50)</td><td align="left" valign="top">.08</td></tr><tr><td align="left" valign="top">Total cholesterol, median (IQR)</td><td align="left" valign="top">125 (98-155)</td><td align="left" valign="top">146 (117-175)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">High-density lipoprotein cholesterol, median (IQR)</td><td align="left" valign="top">25 (14-33)</td><td align="left" valign="top">31 (20-42)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Low-density lipoprotein cholesterol, median (IQR)</td><td align="left" valign="top">67 (50-92)</td><td align="left" valign="top">76 (55-102)</td><td align="left" valign="top">.07</td></tr><tr><td align="left" valign="top">Sugar, median (IQR)</td><td align="left" valign="top">131 (99-184)</td><td align="left" valign="top">135 (101-192)</td><td align="left" valign="top">.60</td></tr><tr><td align="left" valign="top">White blood count (1000), median (IQR)</td><td align="left" valign="top">6.8 (4.6-10.1)</td><td align="left" valign="top">6.1 (4.2-8.7)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Red blood cell, median (IQR)</td><td align="left" valign="top">3.12 (2.71-3.60)</td><td align="left" valign="top">3.53 (2.98-4.19)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Hemoglobin, median (IQR)</td><td align="left" valign="top">9.70 (8.50-11.00)</td><td align="left" valign="top">10.40 (8.90-12.40)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Hematocrit, median (IQR)</td><td align="left" valign="top">29 (26-32)</td><td align="left" valign="top">31 (27-37)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Mean corpuscular volume, median (IQR)</td><td align="left" valign="top">93 (86-99)</td><td align="left" valign="top">90 (85-96)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Mean corpuscular hemoglobin, median (IQR)</td><td align="left" valign="top">31.5 (29.2-33.8)</td><td align="left" valign="top">30.4 (28.3-32.4)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Mean corpuscular hemoglobin concentration, median (IQR)</td><td align="left" valign="top">33.85 (32.90-34.80)</td><td align="left" valign="top">33.50 (32.60-34.40)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Red blood cell distribution width, median (IQR)</td><td align="left" valign="top">17.7 (15.9-20.3)</td><td align="left" valign="top">16.0 (14.5-18.4)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Platelet (1000), median (IQR)</td><td align="left" valign="top">78 (52-115)</td><td align="left" valign="top">106 (63-179)</td><td align="left" valign="top">&#x003C;.001</td></tr></tbody></table><table-wrap-foot><fn id="table1fn1"><p><sup>a</sup>HE: hepatic encephalopathy.</p></fn><fn id="table1fn2"><p><sup>b</sup><italic>P </italic>values calculated using Pearson chi-square test for categorical variables [<xref ref-type="bibr" rid="ref19">19</xref>].<italic> </italic></p></fn><fn id="table1fn3"><p><sup>c</sup><italic>P </italic>values calculated using the Wilcoxon rank sum test for nonnormally distributed continuous variables [<xref ref-type="bibr" rid="ref20">20</xref>]. </p></fn></table-wrap-foot></table-wrap></sec><sec id="s3-3"><title>XGBoost Exhibited the Best Discriminatory Performance Compared With All ML Algorithms and the MELD Score in Both the Training and Validation Datasets</title><p>We further performed the 4 AutoML algorithms, including RF, neural network, SVM, and XGBoost, to compare their performance in terms of predicting HE in patients with noncancer-related ESLD using the training dataset in the EMR system compared to the MELD score and performed further validation using the testing dataset. We first demonstrated that XGBoost exhibited the best discriminatory performance (AUC-ROC 0.86, 95% CI 0.83&#x2010;0.88) compared with RF (AUC-ROC 0.82, 95% CI 0.80&#x2010;0.85), neural network (AUC-ROC 0.79, 95% CI 0.76&#x2010;0.81), SVM (AUC-ROC 0.77, 95% CI 0.73&#x2010;0.80), and the MELD score (AUC-ROC 0.74, 95% CI 0.71&#x2010;0.77; <xref ref-type="table" rid="table2">Tables 2</xref> and <xref ref-type="table" rid="table3">3</xref> and <xref ref-type="fig" rid="figure2">Figure 2</xref>). The cutoff value by Youden index for XGBoost for discriminating HE was 0.25 (training dataset: sensitivity 80%, 95% CI 0.77&#x2010;0.83; specificity 81%, 95% CI 0.80&#x2010;0.82; positive predictive value [PPV] 0.52, 95% CI 0.49&#x2010;0.54; negative predictive value [NPV] 0.94, 95% CI 0.93&#x2010;0.95; positive likelihood ratio 4.22, 95% CI 3.91&#x2010;4.55; negative likelihood ratio 0.25, 95% CI 0.21&#x2010;0.28; and testing dataset: sensitivity 72%, 95% CI 0.67&#x2010;0.77; specificity 80%, 95% CI 0.78&#x2010;0.82; PPV 0.48, 95% CI 0.43&#x2010;0.53; NPV 0.92, 95% CI 0.90&#x2010;0.94; positive likelihood ratio 3.64, 95% CI 3.18&#x2010;4.16; negative likelihood ratio 0.35, 95% CI 0.29&#x2010;0.42; <xref ref-type="table" rid="table4">Table 4</xref>).</p><table-wrap id="t2" position="float"><label>Table 2.</label><caption><p>Performance of the build prediction model in training and testing datasets.</p></caption><table id="table2" frame="hsides" rules="groups"><thead><tr><td align="left" valign="bottom" colspan="2">Methods and dataset</td><td align="left" valign="bottom">Accuracy (95% CI)</td><td align="left" valign="bottom">Sensitivity (95% CI)</td><td align="left" valign="bottom">Specificity (95% CI)</td><td align="left" valign="bottom">AUC-ROC<sup><xref ref-type="table-fn" rid="table2fn1">a</xref></sup> (95% CI)</td></tr></thead><tbody><tr><td align="left" valign="top" colspan="6">Random forest</td></tr><tr><td align="left" valign="top"/><td align="left" valign="top">Training</td><td align="left" valign="top">1.000 (0.99&#x2010;1.00)</td><td align="left" valign="top">1.00</td><td align="left" valign="top">1.00</td><td align="left" valign="top">1.00 (1.00&#x2010;1.00)</td></tr><tr><td align="left" valign="top"/><td align="left" valign="top">Testing</td><td align="left" valign="top">0.82 (0.80&#x2010;0.84)</td><td align="left" valign="top">0.32</td><td align="left" valign="top">0.95</td><td align="left" valign="top">0.82 (0.80&#x2010;0.85)</td></tr><tr><td align="left" valign="top" colspan="6">Neural network</td></tr><tr><td align="left" valign="top"/><td align="left" valign="top">Training</td><td align="left" valign="top">0.81 (0.80&#x2010;0.82)</td><td align="left" valign="top">0.22</td><td align="left" valign="top">0.96</td><td align="left" valign="top">0.80 (0.79&#x2010;0.82)</td></tr><tr><td align="left" valign="top"/><td align="left" valign="top">Testing</td><td align="left" valign="top">0.80 (0.78&#x2010;0.82)</td><td align="left" valign="top">0.25</td><td align="left" valign="top">0.94</td><td align="left" valign="top">0.79 (0.76&#x2010;0.81)</td></tr><tr><td align="left" valign="top" colspan="6">Support vector machine</td></tr><tr><td align="left" valign="top"/><td align="left" valign="top">Training</td><td align="left" valign="top">0.82 (0.81&#x2010;0.83)</td><td align="left" valign="top">0.18</td><td align="left" valign="top">0.98</td><td align="left" valign="top">0.80 (0.78&#x2010;0.81)</td></tr><tr><td align="left" valign="top"/><td align="left" valign="top">Testing</td><td align="left" valign="top">0.81 (0.79&#x2010;0.83)</td><td align="left" valign="top">0.20</td><td align="left" valign="top">0.97</td><td align="left" valign="top">0.77 (0.73&#x2010;0.80)</td></tr><tr><td align="left" valign="top" colspan="6">XGBoost<sup><xref ref-type="table-fn" rid="table2fn2">b</xref></sup></td></tr><tr><td align="left" valign="top"/><td align="left" valign="top">Training</td><td align="left" valign="top">0.85 (0.84&#x2010;0.86)</td><td align="left" valign="top">0.42</td><td align="left" valign="top">0.96</td><td align="left" valign="top">0.88 (0.87&#x2010;0.89)</td></tr><tr><td align="left" valign="top"/><td align="left" valign="top">Testing</td><td align="left" valign="top">0.84 (0.82&#x2010;0.85)</td><td align="left" valign="top">0.38</td><td align="left" valign="top">0.95</td><td align="left" valign="top">0.86 (0.83&#x2010;0.88)</td></tr><tr><td align="left" valign="top" colspan="6">MELD<sup><xref ref-type="table-fn" rid="table2fn3">c</xref></sup> score</td></tr><tr><td align="left" valign="top"/><td align="left" valign="top">Training</td><td align="left" valign="top">N/A<sup><xref ref-type="table-fn" rid="table2fn4">d</xref></sup></td><td align="left" valign="top">N/A</td><td align="left" valign="top">N/A</td><td align="left" valign="top">0.75 (0.74&#x2010;0.77)</td></tr><tr><td align="left" valign="top"/><td align="left" valign="top">Training</td><td align="left" valign="top">N/A</td><td align="left" valign="top">N/A</td><td align="left" valign="top">N/A</td><td align="left" valign="top">0.74 (0.71&#x2010;0.77)</td></tr></tbody></table><table-wrap-foot><fn id="table2fn1"><p><sup>a</sup>AUC-ROC: area under the receiver operating characteristic curve.</p></fn><fn id="table2fn2"><p><sup>b</sup>XGBoost: extreme gradient boosting.</p></fn><fn id="table2fn3"><p><sup>c</sup>MELD: model for end-stage liver disease.</p></fn><fn id="table2fn4"><p><sup>d</sup>N/A: not applicable.</p></fn></table-wrap-foot></table-wrap><table-wrap id="t3" position="float"><label>Table 3.</label><caption><p>Performance of the build prediction model in training and testing datasets.</p></caption><table id="table3" frame="hsides" rules="groups"><thead><tr><td align="left" valign="bottom">Methods</td><td align="left" valign="bottom">Dataset</td><td align="left" valign="bottom">Accuracy (95% CI)</td><td align="left" valign="bottom">Sensitivity (95% CI)</td><td align="left" valign="bottom">Specificity (95% CI)</td><td align="left" valign="bottom">AUC-ROC<sup><xref ref-type="table-fn" rid="table3fn1">a</xref></sup> (95% CI)</td><td align="left" valign="bottom"><italic>P</italic> value</td></tr></thead><tbody><tr><td align="left" valign="top">Random forest</td><td align="left" valign="top">Testing</td><td align="left" valign="top">0.82 (0.80&#x2010;0.84)</td><td align="left" valign="top">0.32</td><td align="left" valign="top">0.95</td><td align="left" valign="top">0.82 (0.80&#x2010;0.85)</td><td align="left" valign="top">.05</td></tr><tr><td align="left" valign="top">Neural network</td><td align="left" valign="top">Testing</td><td align="left" valign="top">0.80 (0.78&#x2010;0.82)</td><td align="left" valign="top">0.25</td><td align="left" valign="top">0.94</td><td align="left" valign="top">0.79 (0.76&#x2010;0.81)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">Support vector machine</td><td align="left" valign="top">Testing</td><td align="left" valign="top">0.81 (0.79&#x2010;0.83)</td><td align="left" valign="top">0.20</td><td align="left" valign="top">0.97</td><td align="left" valign="top">0.77 (0.73&#x2010;0.80)</td><td align="left" valign="top">&#x003C;.001</td></tr><tr><td align="left" valign="top">XGBoost<sup><xref ref-type="table-fn" rid="table3fn2">b</xref></sup></td><td align="left" valign="top">Testing</td><td align="left" valign="top">0.84 (0.82&#x2010;0.85)</td><td align="left" valign="top">0.38</td><td align="left" valign="top">0.95</td><td align="left" valign="top">0.86 (0.83&#x2010;0.88)</td><td align="left" valign="top">&#x2014;<sup><xref ref-type="table-fn" rid="table3fn3">c</xref></sup></td></tr><tr><td align="left" valign="top">MELD<sup><xref ref-type="table-fn" rid="table3fn4">d</xref></sup> score</td><td align="left" valign="top">Training</td><td align="left" valign="top">N/A<sup><xref ref-type="table-fn" rid="table3fn5">e</xref></sup></td><td align="left" valign="top">N/A</td><td align="left" valign="top">N/A</td><td align="left" valign="top">0.74 (0.71&#x2010;0.77)</td><td align="left" valign="top">&#x003C;.001</td></tr></tbody></table><table-wrap-foot><fn id="table3fn1"><p><sup>a</sup>AUC-ROC: area under the receiver operating characteristic curve.</p></fn><fn id="table3fn2"><p><sup>b</sup>XGBoost: extreme gradient boosting.</p></fn><fn id="table3fn3"><p><sup>c</sup>Not available.</p></fn><fn id="table3fn4"><p><sup>d</sup>MELD: model for end-stage liver disease.</p></fn><fn id="table3fn5"><p><sup>e</sup>N/A: not applicable.</p></fn></table-wrap-foot></table-wrap><fig position="float" id="figure2"><label>Figure 2.</label><caption><p>Performance of the machine learning models: (A) random forest, (B) neural network, (C) support vector machine, (D) extreme gradient boosting, and (E) model for end-stage liver disease score.</p></caption><graphic alt-version="no" mimetype="image" position="float" xlink:type="simple" xlink:href="medinform_v13i1e71229_fig02.png"/></fig><table-wrap id="t4" position="float"><label>Table 4.</label><caption><p>Performance of the extreme gradient boosting model for hepatic encephalopathy prediction in training and validation datasets (Youden index=0.25).</p></caption><table id="table4" frame="hsides" rules="groups"><thead><tr><td align="left" valign="bottom"/><td align="left" valign="bottom">Training set</td><td align="left" valign="bottom">Testing set</td></tr></thead><tbody><tr><td align="left" valign="top">Sensitivity (95% CI)</td><td align="left" valign="top">0.80 (0.77-0.83)</td><td align="left" valign="top">0.72 (0.67-0.77)</td></tr><tr><td align="left" valign="top">Specificity (95% CI)</td><td align="left" valign="top">0.81 (0.80-0.82)</td><td align="left" valign="top">0.80 (0.78-0.82)</td></tr><tr><td align="left" valign="top">Positive predictive value (95% CI)</td><td align="left" valign="top">0.52 (0.49-0.54)</td><td align="left" valign="top">0.48 (0.43-0.53)</td></tr><tr><td align="left" valign="top">Negative predictive value (95% CI)</td><td align="left" valign="top">0.94 (0.93-0.95)</td><td align="left" valign="top">0.92 (0.90-0.94)</td></tr><tr><td align="left" valign="top">Positive likelihood ratio (95% CI)</td><td align="left" valign="top">4.22 (3.91-4.55)</td><td align="left" valign="top">3.64 (3.18-4.16)</td></tr><tr><td align="left" valign="top">Negative likelihood ratio (95% CI)</td><td align="left" valign="top">0.25 (0.21-0.28)</td><td align="left" valign="top">0.35 (0.29-0.42)</td></tr></tbody></table></table-wrap><p>Regarding performance in predicting incident HE, XGBoost achieved the best accuracy in the testing dataset compared with RF, neural network, SVM, and the MELD score (XGBoost: accuracy 0.84, 95% CI 0.82&#x2010;0.85; RF: accuracy 0.82, 95% CI 0.80&#x2010;0.84; neural network: accuracy 0.80, 95% CI 0.78&#x2010;0.82; SVM: accuracy 0.81, 95% CI 0.79&#x2010;0.83). These findings strongly indicate that our ML-based XGBoost algorithm is a superior tool for predicting HE in patients with noncancer-related cirrhosis in comparison with the other ML models and traditional MELD scores, especially for ruling out disease when the finding returns a negative result; this could be an applicable tool to guide clinicians in palliative care clinical settings (<xref ref-type="table" rid="table2">Tables 2</xref><xref ref-type="table" rid="table3"/>-<xref ref-type="table" rid="table4">4</xref> and Table S2 in <xref ref-type="supplementary-material" rid="app1">Multimedia Appendix 1</xref>).</p></sec><sec id="s3-4"><title>Serum Ammonia Was the Foremost Important Feature, Followed by Other Variables, in the ML-Based XGBoost Algorithm for Predicting HE in Patients With Noncancer-Related ESLD</title><p>Additionally, we constructed a SHAP to reveal the weight of each feature on the outcomes of the trained model&#x2019;s predictability based on feature importance. We demonstrated the essential features&#x2019; contribution to the predictive outcomes, including serum levels of ammonia, total bilirubin, INR, CRP, patient age, total platelet count, BUN, PT, K, AST, albumin, red blood cell distribution width, ALT, mean corpuscular hemoglobin, and history of HBV infection (<xref ref-type="table" rid="table5">Table 5</xref>). Based on the SHAP values of feature importance, we further disclosed that higher levels of serum ammonia, total bilirubin, INR, older age, BUN, and PT, lower serum levels of albumin and serum K, and lower platelet counts result in a higher probability of HE in patients with noncancer-related ESLD. Furthermore, among the 15 key variables in the AutoML model based on the XGBoost algorithm, ammonia was the most important feature impacting the probability of HE risk, followed by total bilirubin, INR, CRP, age, platelet, BUN, PT, and serum K (<xref ref-type="fig" rid="figure3">Figure 3</xref>).</p><table-wrap id="t5" position="float"><label>Table 5.</label><caption><p>Feature importance from the extreme gradient boosting model based on Shapley Additive Explanations values.</p></caption><table id="table5" frame="hsides" rules="groups"><thead><tr><td align="left" valign="top">Rank</td><td align="left" valign="top">Clinical feature</td></tr></thead><tbody><tr><td align="char" char="." valign="top">1</td><td align="left" valign="top">Ammonia</td></tr><tr><td align="char" char="." valign="top">2</td><td align="left" valign="top">Total bilirubin</td></tr><tr><td align="char" char="." valign="top">3</td><td align="left" valign="top">Albumin</td></tr><tr><td align="char" char="." valign="top">4</td><td align="left" valign="top">International normalized ratio</td></tr><tr><td align="char" char="." valign="top">5</td><td align="left" valign="top">Platelet</td></tr><tr><td align="char" char="." valign="top">6</td><td align="left" valign="top">C-reactive protein</td></tr><tr><td align="char" char="." valign="top">7</td><td align="left" valign="top">Age</td></tr><tr><td align="char" char="." valign="top">8</td><td align="left" valign="top">Blood urea nitrogen</td></tr><tr><td align="char" char="." valign="top">9</td><td align="left" valign="top">Aspartate transaminase</td></tr><tr><td align="char" char="." valign="top">10</td><td align="left" valign="top">Potassium</td></tr><tr><td align="char" char="." valign="top">11</td><td align="left" valign="top">Prothrombin time</td></tr><tr><td align="char" char="." valign="top">12</td><td align="left" valign="top">Red blood cell distribution width</td></tr><tr><td align="char" char="." valign="top">13</td><td align="left" valign="top">Alanine transaminase</td></tr><tr><td align="char" char="." valign="top">14</td><td align="left" valign="top">Mean corpuscular hemoglobin</td></tr><tr><td align="char" char="." valign="top">15</td><td align="left" valign="top">Hepatitis B virus</td></tr><tr><td align="char" char="." valign="top">16</td><td align="left" valign="top">Alcohol use</td></tr></tbody></table></table-wrap><fig position="float" id="figure3"><label>Figure 3.</label><caption><p>SHAP summary plot to explain the feature importance obtained by the extreme gradient boosting algorithm. Features with higher feature value (red) and positive SHAP value (on the right side) show a positive association, while features with higher feature value (blue) and negative SHAP value (on the left side) show a negative association. K: potassium; SHAP: Shapley Additive Explanations.</p></caption><graphic alt-version="no" mimetype="image" position="float" xlink:type="simple" xlink:href="medinform_v13i1e71229_fig03.png"/></fig><p>Taken together, compared with other ML-based models, such as RF, neural network, and SVM, our ML-based XGBoost algorithm demonstrated the best performance for HE predictability in patients with noncancer-related ESLD. Among the variables in the XGBoost model, serum ammonia levels, together with other feature variables, constituted the most important influence regarding HE predictability in patients with noncancer-related cirrhosis.</p></sec></sec><sec id="s4" sec-type="discussion"><title>Discussion</title><sec id="s4-1"><title>Principal Findings</title><p>In our multicenter retrospective longitudinal study, we developed an ML-based prognostic model to improve the early prediction of HE in patients with noncancer-related cirrhosis. Among the evaluated algorithms, the XGBoost model consistently demonstrated superior predictive performance in terms of discriminability, accuracy, and robustness&#x2014;particularly in ruling out HE with high NPV&#x2014;across both training and validation datasets.</p><p>The choice of XGBoost was driven by its technical advantages over other ML algorithms such as RF, neural network, and SVM. Unlike RF, which may experience overfitting in complex high-dimensional data, XGBoost incorporates regularization techniques that reduce variance and improve generalizability. Additionally, XGBoost handles multicollinearity and missing values more effectively than logistic regression and is computationally efficient for structured tabular data. These characteristics make XGBoost a particularly well-suited algorithm for clinical prediction tasks using EMR datasets. Our novel ML-based XGBoost predictive model is an applicable tool to guide clinicians in shared decision-making of treatment strategy to further improve patient care and reduce their distress from morbid complications in clinical settings of noncancer-related populations.</p><p>To enhance model interpretability, we conducted a SHAP analysis to identify and visualize the contribution of individual predictors to the model output. This analysis revealed that serum ammonia is the most important feature, followed by bilirubin, INR, age, and BUN, which are positively associated with increased HE risk; whereas albumin, platelet counts, and serum potassium are negatively associated with HE risk. Notably, serum potassium and transaminases emerged as key predictors of HE&#x2014;findings that warrant further clinical interpretation. From a pathophysiological perspective, hypokalemia is known to exacerbate HE by increasing renal ammonia production and systemic ammonia load [<xref ref-type="bibr" rid="ref21">21</xref>,<xref ref-type="bibr" rid="ref22">22</xref>]. This mechanistic link is supported by our data, where lower serum potassium was associated with increased HE risk. Similarly, elevated AST and ALT levels reflect ongoing hepatic inflammation or necroinflammation, which may impair ammonia detoxification, thereby promoting HE [<xref ref-type="bibr" rid="ref23">23</xref>]. These markers, therefore, not only reflect liver injury but also serve as early warning signs for impending encephalopathy, reinforcing their clinical utility in risk stratification and monitoring. Furthermore, to our knowledge, this is the first study to predict HE in a Taiwanese adult population using an ML algorithm. Our use of SHAP further enhances model transparency and interpretability&#x2014;both of which are critical for clinical adoption. SHAP values enable clinicians to understand how individual variables influence predictions, thereby building trust and supporting shared decision-making with patients.</p><p>Despite the pathogenesis of HE not being fully understood, an increasing number of studies have shown that various forms of inflammation, such as systemic inflammation, neuroinflammation, endotoxemia, and ammonia-inflammation synergism, significantly contribute to the development of HE [<xref ref-type="bibr" rid="ref24">24</xref>]. Serum CRP, which is known as an inflammation marker, is associated with the development of HE and can serve as a predictor of adverse outcomes and increased risk of HE in patients hospitalized with liver cirrhosis [<xref ref-type="bibr" rid="ref25">25</xref>,<xref ref-type="bibr" rid="ref26">26</xref>]. In our data, the HE group exhibited a significantly increased level of serum CRP compared with the non-HE group (<italic>P</italic>&#x003C;.001) among patients with noncancer-related ESLD. It is of note that our SHAP for feature importance analysis did not show a strong positive influence of serum CRP levels on the increase in HE risk in patients with noncancer cirrhosis. One of the possible reasons for these different study findings could be that the baseline settings of the populations differed between these 2 studies as well as the fact that the pathogenic etiology of HE in populations without cancer differs significantly from that in patients with terminal cancer. In our dataset, the results could have been influenced by outliers of serum CRP because the median serum CRP level in the HE group was significantly higher than that in the non-HE group. This indicates that CRP still plays an important role in HE occurrence.</p></sec><sec id="s4-2"><title>Comparison to Prior Work</title><p>Our findings revealed notable differences in baseline characteristics between patients with noncancer-related ESLD with and without HE, highlighting the heterogeneity of populations with cirrhosis and the multifactorial nature of HE development. Specifically, patients with HE exhibited higher prevalences of HBV infection, alcohol use, sepsis, and mortality rates compared with their counterparts without HE. In another study [<xref ref-type="bibr" rid="ref3">3</xref>], among 49,164 patients diagnosed with HE, 24,183 (49.2%) were affected by alcohol-related cirrhosis, 18,352 (37.3%) had HCV infection, and only 2589 (5.3%) had HBV-related cirrhosis, with some cases showing overlap. These differences may be due to the high prevalence of HBV infection in Taiwan. However, other research indicates a decline in the age-standardized incidence rates for liver cirrhosis due to HBV globally from 1990 to 2019, while the incidence rates for nonalcoholic fatty liver disease, alcohol use, and other causes increased during the same period [<xref ref-type="bibr" rid="ref2">2</xref>]. This suggests a potential shift in the etiology of cirrhosis.</p><p>Importantly, our study demonstrates that the XGBoost algorithm has superior discriminatory performance in predicting HE compared with other ML algorithms and MELD scores. The robust sensitivity, specificity, PPV, NPV, and accuracy of the XGBoost model underscore its potential applicability as a valuable clinical decision support tool for early HE detection and risk stratification in populations with noncancer-related cirrhosis. The MELD score, initially designed to predict survival after elective transjugular intrahepatic portosystemic shunt placement, has been validated for predicting survival across diverse patient cohorts with varying liver disease severity and from different geographic and temporal backgrounds. Moreover, the MELD score is widely used to prioritize liver transplantation, primarily relying on serum bilirubin, creatinine, and INR levels. Although it provides a general assessment of liver function, it may not fully capture the multifactorial nature of HE development. By contrast, the capacity of ML algorithms to manage complex interactions and nonlinear relationships is a significant advantage that can improve the accuracy of prediction models. Our XGBoost model incorporated a broader range of variables, including ammonia, total bilirubin, INR, age, BUN, albumin, platelet count, and serum K, allowing for a more detailed and accurate prediction of HE risk. This approach may offer valuable insights into disease pathogenesis and prognosis.</p><p>Recent studies have demonstrated the value of ML in liver disease prognostication. Verma et al [<xref ref-type="bibr" rid="ref27">27</xref>] stratified patients with acute-on-chronic liver failure into survival-based clusters using integrated ML methods. Malik et al [<xref ref-type="bibr" rid="ref28">28</xref>] reviewed ML applications in predicting esophageal variceal bleeding, while M&#x00FC;ller et al [<xref ref-type="bibr" rid="ref29">29</xref>] identified early cirrhosis decompensation using ML models. Other studies used neural networks to forecast 1-year mortality after variceal bleeding [<xref ref-type="bibr" rid="ref30">30</xref>] or liver transplantation [<xref ref-type="bibr" rid="ref31">31</xref>], emphasizing the trend toward long-term outcome modeling. These findings underscore ML&#x2019;s expanding role in liver disease prediction. Our study contributes to this field by focusing on early HE prediction in noncancer-related cirrhosis using a transparent and interpretable XGBoost framework. Another regional study conducted on 1256 patients with cirrhosis with unbalanced data used several ML methods, specifically SVM, logistic regression, and CatBoost, to predict HE [<xref ref-type="bibr" rid="ref32">32</xref>]. Although the weighted RF model emerged with an accuracy of 0.8732 (95% CI 0.8711&#x2010;0.8752) and an AUC-ROC of 0.82, in that study, the HE predictability was far inferior to our ML-based XGBoost model. Our XGBoost model significantly outperformed weighted RF, achieving an accuracy of 0.84 (95% CI 0.82&#x2010;0.85) and an AUC-ROC of 0.86 (95% CI 0.83&#x2010;0.88). It showed advantages on XGBoost. XGBoost uses boosting with regularization to reduce overfitting and improve generalization. It also handles missing data and multicollinearity effectively. XGBoost is more efficient and interpretable for structured clinical data better than SVM and neural networks [<xref ref-type="bibr" rid="ref33">33</xref>,<xref ref-type="bibr" rid="ref34">34</xref>]. Additionally, we applied SHAP to identify and visualize the contributions of individual features to the model&#x2019;s predictions. Its consistent and locally accurate attributions improve interpretability, facilitating clinical trust by clarifying how key variables may influence disease outcomes [<xref ref-type="bibr" rid="ref35">35</xref>].</p></sec><sec id="s4-3"><title>Limitations</title><p>While our study contributes to advancing the understanding of HE prediction and prognostication of patients with noncancer-related cirrhosis, several limitations warrant consideration. First, despite our application of the Boruta algorithm for feature selection and the use of the synthetic minority over-sampling technique for imbalanced datasets, retrospective analyses still inherently carried biases related to data completeness, documentation accuracy, and confounding variables. Second, the generalizability of our findings to diverse patient populations and health care settings may be limited. As aforementioned, the different etiology of ESLD may affect model application.</p></sec><sec id="s4-4"><title>Future Directions</title><p>Building upon the aforementioned limitations, future research should prioritize prospective validation in diverse populations and explore the integration of the predictive model into clinical decision support systems. Moreover, external validation across different institutions and geographic settings is essential to evaluate the model&#x2019;s generalizability and transportability. Embedding the model into cloud-based platforms or EMR systems may further enhance its accessibility and facilitate real-world clinical implementation. Additionally, regarding the other scoring systems, such as the Bilirubin-Albumin-Beta-Blocker-Statin score and MASQ-HE score developed by Tapper et al [<xref ref-type="bibr" rid="ref36">36</xref>,<xref ref-type="bibr" rid="ref37">37</xref>], both include adding medications, such as the use of nonselective &#x03B2;-blockers and statins, in addition to quality of life and physical function, to improve the performance in terms of the predictability of HE risk. Therefore, integrating additional clinical variables may enhance model accuracy for the prediction of HE and thus should be considered in the future development of ML-based models.</p></sec><sec id="s4-5"><title>Conclusions</title><p>Our ML-based XGBoost model demonstrated superior predictive performance for the early detection and prognostication of HE in patients with noncancer-related cirrhosis. Beyond its predictive accuracy, the model shows promise as a clinically valuable tool for use in terminal care settings, outperforming previously established ML algorithms and conventional prognostic scores such as the MELD score. To the best of our knowledge, this is the first ML-based model specifically developed for prognostication and HE prediction in a Taiwanese adult population with noncancer-related cirrhosis&#x2014;a subgroup with higher prevalence and more unpredictable disease trajectories compared to patients with cancer-related cirrhosis. By incorporating a broader set of clinical features and leveraging SHAP-based interpretability, our model facilitates more precise risk stratification and may support clinicians in making informed decisions aimed at preventing severe complications and improving patients&#x2019; quality of life. Future studies are warranted to externally validate this model in larger and more diverse populations and to assess its clinical utility through prospective follow-up of patient outcomes.</p></sec></sec></body><back><ack><p>This work was supported by Chang Gung Memorial Hospital Research Projects (CMRPG2M0041, CMRPVVM0182, CORPVVN0131, and CORPG3P0622). The authors are grateful to the members of the Maintenance Project of the Biostatistical Consultation Centre at Chang Gung Memorial Hospital (Linkou and Keelung branches) for assistance with the data analysis from the Chang Gung Research Database provided by Chang Gung Memorial Hospital. The sponsors had no role in study design, data collection, analysis, interpretation, manuscript writing, or the decision to submit the manuscript for publication.</p></ack><fn-group><fn fn-type="con"><p>HYC and YWT conceived and designed the study. YWT was responsible for data acquisition. Data analysis and interpretation were performed by HYC, WCY, and YWT. HYC drafted the manuscript, and statistical analyses were conducted by HYC and YWT. The study was supervised by YWT. All authors reviewed and approved the final manuscript.</p></fn><fn fn-type="conflict"><p>None declared.</p></fn></fn-group><glossary><title>Abbreviations</title><def-list><def-item><term id="abb1">ALT</term><def><p>alanine transaminase</p></def></def-item><def-item><term id="abb2">AST</term><def><p>aspartate transaminase</p></def></def-item><def-item><term id="abb3">AUC</term><def><p>area under the curve</p></def></def-item><def-item><term id="abb4">AUC-ROC</term><def><p>area under the receiver operating characteristic curve</p></def></def-item><def-item><term id="abb5">BUN</term><def><p>blood urea nitrogen</p></def></def-item><def-item><term id="abb6">CRP</term><def><p>C-reactive protein</p></def></def-item><def-item><term id="abb7">EMR</term><def><p>electronic medical record</p></def></def-item><def-item><term id="abb8">ESLD</term><def><p>end-stage liver disease</p></def></def-item><def-item><term id="abb9">HBV</term><def><p>hepatitis B virus</p></def></def-item><def-item><term id="abb10">HCV</term><def><p>hepatitis C virus</p></def></def-item><def-item><term id="abb11">HE</term><def><p>hepatic encephalopathy</p></def></def-item><def-item><term id="abb12">ICD</term><def><p>International Classification of Diseases</p></def></def-item><def-item><term id="abb13">INR</term><def><p>international normalized ratio</p></def></def-item><def-item><term id="abb14">MELD</term><def><p>model for end-stage liver disease</p></def></def-item><def-item><term id="abb15">ML</term><def><p>machine learning</p></def></def-item><def-item><term id="abb16">NPV</term><def><p>negative predictive value</p></def></def-item><def-item><term id="abb17">PPV</term><def><p>positive predictive value</p></def></def-item><def-item><term id="abb18">PT</term><def><p>prothrombin time</p></def></def-item><def-item><term id="abb19">RF</term><def><p>random forest</p></def></def-item><def-item><term id="abb20">SHAP</term><def><p>Shapley Additive Explanations</p></def></def-item><def-item><term id="abb21">SVM</term><def><p>support vector machine</p></def></def-item><def-item><term id="abb22">TRIPOD</term><def><p>Transparent Reporting of a Multivariable Prediction Model for Individual Prognosis or Diagnosis</p></def></def-item><def-item><term id="abb23">XGBoost</term><def><p>extreme gradient boosting</p></def></def-item></def-list></glossary><ref-list><title>References</title><ref id="ref1"><label>1</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><collab>GBD 2017 Cirrhosis Collaborators</collab></person-group><article-title>The global, regional, and national burden of cirrhosis by cause in 195 countries and territories, 1990-2017: a systematic analysis for the global burden of disease study 2017</article-title><source>Lancet Gastroenterol Hepatol</source><year>2020</year><volume>5</volume><fpage>245</fpage><lpage>266</lpage><pub-id pub-id-type="doi">10.1016/S2468-1253(19)30349-8</pub-id></nlm-citation></ref><ref id="ref2"><label>2</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Wu</surname><given-names>XN</given-names> </name><name name-style="western"><surname>Xue</surname><given-names>F</given-names> </name><name name-style="western"><surname>Zhang</surname><given-names>N</given-names> </name><etal/></person-group><article-title>Global burden of liver cirrhosis and other chronic liver diseases caused by specific etiologies from 1990 to 2019</article-title><source>BMC Public Health</source><year>2024</year><month>02</month><day>3</day><volume>24</volume><issue>1</issue><fpage>363</fpage><pub-id pub-id-type="doi">10.1186/s12889-024-17948-6</pub-id><pub-id pub-id-type="medline">38310221</pub-id></nlm-citation></ref><ref id="ref3"><label>3</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Tapper</surname><given-names>EB</given-names> </name><name name-style="western"><surname>Aberasturi</surname><given-names>D</given-names> </name><name name-style="western"><surname>Zhao</surname><given-names>Z</given-names> </name><name name-style="western"><surname>Hsu</surname><given-names>CY</given-names> </name><name name-style="western"><surname>Parikh</surname><given-names>ND</given-names> </name></person-group><article-title>Outcomes after hepatic encephalopathy in population-based cohorts of patients with cirrhosis</article-title><source>Aliment Pharmacol Ther</source><year>2020</year><month>06</month><volume>51</volume><issue>12</issue><fpage>1397</fpage><lpage>1405</lpage><pub-id pub-id-type="doi">10.1111/apt.15749</pub-id><pub-id pub-id-type="medline">32363684</pub-id></nlm-citation></ref><ref id="ref4"><label>4</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Elsaid</surname><given-names>MI</given-names> </name><name name-style="western"><surname>John</surname><given-names>T</given-names> </name><name name-style="western"><surname>Li</surname><given-names>Y</given-names> </name><name name-style="western"><surname>Pentakota</surname><given-names>SR</given-names> </name><name name-style="western"><surname>Rustgi</surname><given-names>VK</given-names> </name></person-group><article-title>The health care burden of hepatic encephalopathy</article-title><source>Clin Liver Dis</source><year>2020</year><month>05</month><volume>24</volume><issue>2</issue><fpage>263</fpage><lpage>275</lpage><pub-id pub-id-type="doi">10.1016/j.cld.2020.01.006</pub-id><pub-id pub-id-type="medline">32245532</pub-id></nlm-citation></ref><ref id="ref5"><label>5</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Riggio</surname><given-names>O</given-names> </name><name name-style="western"><surname>Celsa</surname><given-names>C</given-names> </name><name name-style="western"><surname>Calvaruso</surname><given-names>V</given-names> </name><etal/></person-group><article-title>Hepatic encephalopathy increases the risk for mortality and hospital readmission in decompensated cirrhotic patients: a prospective multicenter study</article-title><source>Front Med (Lausanne)</source><year>2023</year><volume>10</volume><issue>10</issue><fpage>1184860</fpage><pub-id pub-id-type="doi">10.3389/fmed.2023.1184860</pub-id><pub-id pub-id-type="medline">37305121</pub-id></nlm-citation></ref><ref id="ref6"><label>6</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Louissaint</surname><given-names>J</given-names> </name><name name-style="western"><surname>Deutsch-Link</surname><given-names>S</given-names> </name><name name-style="western"><surname>Tapper</surname><given-names>EB</given-names> </name></person-group><article-title>Changing epidemiology of cirrhosis and hepatic encephalopathy</article-title><source>Clin Gastroenterol Hepatol</source><year>2022</year><month>08</month><volume>20</volume><issue>8S</issue><fpage>S1</fpage><lpage>S8</lpage><pub-id pub-id-type="doi">10.1016/j.cgh.2022.04.036</pub-id><pub-id pub-id-type="medline">35940729</pub-id></nlm-citation></ref><ref id="ref7"><label>7</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>P&#x00E9;rez-Matos</surname><given-names>MC</given-names> </name><name name-style="western"><surname>Jiang</surname><given-names>ZG</given-names> </name><name name-style="western"><surname>Tapper</surname><given-names>EB</given-names> </name></person-group><article-title>Factors that affect results of psychometric tests to identify patients with minimal hepatic encephalopathy</article-title><source>Clin Gastroenterol Hepatol</source><year>2018</year><month>11</month><volume>16</volume><issue>11</issue><fpage>1836</fpage><lpage>1838</lpage><pub-id pub-id-type="doi">10.1016/j.cgh.2018.03.010</pub-id><pub-id pub-id-type="medline">29551739</pub-id></nlm-citation></ref><ref id="ref8"><label>8</label><nlm-citation citation-type="report"><article-title>White paper on palliative and hospice care policy in Taiwan</article-title><year>2019</year><access-date>2025-07-19</access-date><publisher-name>National Health Research Institutes</publisher-name><comment><ext-link ext-link-type="uri" xlink:href="https://www.nhri.edu.tw/Files/2020-02-25-001.pdf">https://www.nhri.edu.tw/Files/2020-02-25-001.pdf</ext-link></comment></nlm-citation></ref><ref id="ref9"><label>9</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Cheng</surname><given-names>SH</given-names> </name><name name-style="western"><surname>Chiang</surname><given-names>TL</given-names> </name></person-group><article-title>The effect of universal health insurance on health care utilization in Taiwan. Results from a natural experiment</article-title><source>JAMA</source><year>1997</year><month>07</month><day>9</day><volume>278</volume><issue>2</issue><fpage>89</fpage><lpage>93</lpage><pub-id pub-id-type="doi">10.1001/jama.278.2.89</pub-id><pub-id pub-id-type="medline">9214512</pub-id></nlm-citation></ref><ref id="ref10"><label>10</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Cheng</surname><given-names>TM</given-names> </name></person-group><article-title>Taiwan&#x2019;s new national health insurance program: genesis and experience so far</article-title><source>Health Aff (Millwood)</source><year>2003</year><volume>22</volume><issue>3</issue><fpage>61</fpage><lpage>76</lpage><pub-id pub-id-type="doi">10.1377/hlthaff.22.3.61</pub-id><pub-id pub-id-type="medline">12757273</pub-id></nlm-citation></ref><ref id="ref11"><label>11</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Lin</surname><given-names>LY</given-names> </name><name name-style="western"><surname>Warren-Gash</surname><given-names>C</given-names> </name><name name-style="western"><surname>Smeeth</surname><given-names>L</given-names> </name><name name-style="western"><surname>Chen</surname><given-names>PC</given-names> </name></person-group><article-title>Data resource profile: the National Health Insurance Research Database (NHIRD)</article-title><source>Epidemiol Health</source><year>2018</year><volume>40</volume><fpage>e2018062</fpage><pub-id pub-id-type="doi">10.4178/epih.e2018062</pub-id><pub-id pub-id-type="medline">30727703</pub-id></nlm-citation></ref><ref id="ref12"><label>12</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Woodland</surname><given-names>H</given-names> </name><name name-style="western"><surname>Buchanan</surname><given-names>RM</given-names> </name><name name-style="western"><surname>Pring</surname><given-names>A</given-names> </name><etal/></person-group><article-title>Inequity in end-of-life care for patients with chronic liver disease in England</article-title><source>Liver Int</source><year>2023</year><month>11</month><volume>43</volume><issue>11</issue><fpage>2393</fpage><lpage>2403</lpage><pub-id pub-id-type="doi">10.1111/liv.15684</pub-id><pub-id pub-id-type="medline">37519025</pub-id></nlm-citation></ref><ref id="ref13"><label>13</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Langberg</surname><given-names>KM</given-names> </name><name name-style="western"><surname>Kapo</surname><given-names>JM</given-names> </name><name name-style="western"><surname>Taddei</surname><given-names>TH</given-names> </name></person-group><article-title>Palliative care in decompensated cirrhosis: a review</article-title><source>Liver Int</source><year>2018</year><month>05</month><volume>38</volume><issue>5</issue><fpage>768</fpage><lpage>775</lpage><pub-id pub-id-type="doi">10.1111/liv.13620</pub-id><pub-id pub-id-type="medline">29112338</pub-id></nlm-citation></ref><ref id="ref14"><label>14</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Roth</surname><given-names>K</given-names> </name><name name-style="western"><surname>Lynn</surname><given-names>J</given-names> </name><name name-style="western"><surname>Zhong</surname><given-names>Z</given-names> </name><name name-style="western"><surname>Borum</surname><given-names>M</given-names> </name><name name-style="western"><surname>Dawson</surname><given-names>NV</given-names> </name></person-group><article-title>Dying with end stage liver disease with cirrhosis: insights from SUPPORT. Study to Understand Prognoses and Preferences for Outcomes and Risks of Treatment</article-title><source>J Am Geriatr Soc</source><year>2000</year><month>05</month><volume>48</volume><issue>S1</issue><fpage>S122</fpage><lpage>S130</lpage><pub-id pub-id-type="medline">10809465</pub-id></nlm-citation></ref><ref id="ref15"><label>15</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Malinchoc</surname><given-names>M</given-names> </name><name name-style="western"><surname>Kamath</surname><given-names>PS</given-names> </name><name name-style="western"><surname>Gordon</surname><given-names>FD</given-names> </name><name name-style="western"><surname>Peine</surname><given-names>CJ</given-names> </name><name name-style="western"><surname>Rank</surname><given-names>J</given-names> </name><name name-style="western"><surname>ter Borg</surname><given-names>PC</given-names> </name></person-group><article-title>A model to predict poor survival in patients undergoing transjugular intrahepatic portosystemic shunts</article-title><source>Hepatology</source><year>2000</year><month>04</month><volume>31</volume><issue>4</issue><fpage>864</fpage><lpage>871</lpage><pub-id pub-id-type="doi">10.1053/he.2000.5852</pub-id><pub-id pub-id-type="medline">10733541</pub-id></nlm-citation></ref><ref id="ref16"><label>16</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Kursa</surname><given-names>MB</given-names> </name><name name-style="western"><surname>Rudnicki</surname><given-names>WR</given-names> </name></person-group><article-title>Feature selection with the Boruta package</article-title><source>J Stat Softw</source><year>2010</year><volume>36</volume><fpage>1</fpage><lpage>13</lpage><pub-id pub-id-type="doi">10.18637/jss.v036.i11</pub-id></nlm-citation></ref><ref id="ref17"><label>17</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Kuhn</surname><given-names>M</given-names> </name></person-group><article-title>Building predictive models in R using the caret package</article-title><source>J Stat Softw</source><year>2008</year><volume>28</volume><pub-id pub-id-type="doi">10.18637/jss.v028.i05</pub-id></nlm-citation></ref><ref id="ref18"><label>18</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Figueroa</surname><given-names>RL</given-names> </name><name name-style="western"><surname>Zeng-Treitler</surname><given-names>Q</given-names> </name><name name-style="western"><surname>Kandula</surname><given-names>S</given-names> </name><name name-style="western"><surname>Ngo</surname><given-names>LH</given-names> </name></person-group><article-title>Predicting sample size required for classification performance</article-title><source>BMC Med Inform Decis Mak</source><year>2012</year><month>02</month><day>15</day><volume>12</volume><fpage>8</fpage><pub-id pub-id-type="doi">10.1186/1472-6947-12-8</pub-id><pub-id pub-id-type="medline">22336388</pub-id></nlm-citation></ref><ref id="ref19"><label>19</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Pearson</surname><given-names>K</given-names> </name></person-group><article-title>On the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can be reasonably supposed to have arisen from random sampling</article-title><source>Philos Mag (Abingdon)</source><year>1900</year><volume>50</volume><issue>302</issue><fpage>157</fpage><lpage>175</lpage><pub-id pub-id-type="doi">10.1080/14786440009463897</pub-id></nlm-citation></ref><ref id="ref20"><label>20</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Wilcoxon</surname><given-names>F</given-names> </name></person-group><article-title>Individual comparisons by ranking methods</article-title><source>Biometrics Bull</source><year>1945</year><volume>1</volume><issue>6</issue><fpage>80</fpage><lpage>83</lpage><pub-id pub-id-type="doi">10.2307/3001968</pub-id></nlm-citation></ref><ref id="ref21"><label>21</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>H&#x00E4;ussinger</surname><given-names>D</given-names> </name><name name-style="western"><surname>Kircheis</surname><given-names>G</given-names> </name><name name-style="western"><surname>Fischer</surname><given-names>R</given-names> </name><name name-style="western"><surname>Schliess</surname><given-names>F</given-names> </name><name name-style="western"><surname>vom Dahl</surname><given-names>S</given-names> </name></person-group><article-title>Hepatic encephalopathy in chronic liver disease: a clinical manifestation of astrocyte swelling and low-grade cerebral edema?</article-title><source>J Hepatol</source><year>2000</year><month>06</month><volume>32</volume><issue>6</issue><fpage>1035</fpage><lpage>1038</lpage><pub-id pub-id-type="doi">10.1016/s0168-8278(00)80110-5</pub-id><pub-id pub-id-type="medline">10898326</pub-id></nlm-citation></ref><ref id="ref22"><label>22</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Ullah</surname><given-names>H</given-names> </name><name name-style="western"><surname>Shabana</surname><given-names>H</given-names> </name><name name-style="western"><surname>Rady</surname><given-names>MA</given-names> </name><etal/></person-group><article-title>Hypokalemia as a responsible factor related with the severity of hepatic encephalopathy: a wide multination cross-sectional study</article-title><source>Ann Med Surg (Lond)</source><year>2023</year><month>06</month><volume>85</volume><issue>6</issue><fpage>2427</fpage><lpage>2431</lpage><pub-id pub-id-type="doi">10.1097/MS9.0000000000000470</pub-id><pub-id pub-id-type="medline">37363515</pub-id></nlm-citation></ref><ref id="ref23"><label>23</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Butterworth</surname><given-names>RF</given-names> </name></person-group><article-title>Pathogenesis of hepatic encephalopathy: new insights from neuroimaging and molecular studies</article-title><source>J Hepatol</source><year>2003</year><month>08</month><volume>39</volume><issue>2</issue><fpage>278</fpage><lpage>285</lpage><pub-id pub-id-type="doi">10.1016/s0168-8278(03)00267-8</pub-id><pub-id pub-id-type="medline">12873828</pub-id></nlm-citation></ref><ref id="ref24"><label>24</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Luo</surname><given-names>M</given-names> </name><name name-style="western"><surname>Guo</surname><given-names>JY</given-names> </name><name name-style="western"><surname>Cao</surname><given-names>WK</given-names> </name></person-group><article-title>Inflammation: a novel target of current therapies for hepatic encephalopathy in liver cirrhosis</article-title><source>World J Gastroenterol</source><year>2015</year><month>11</month><day>7</day><volume>21</volume><issue>41</issue><fpage>11815</fpage><lpage>11824</lpage><pub-id pub-id-type="doi">10.3748/wjg.v21.i41.11815</pub-id><pub-id pub-id-type="medline">26557005</pub-id></nlm-citation></ref><ref id="ref25"><label>25</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Iwasa</surname><given-names>M</given-names> </name><name name-style="western"><surname>Sugimoto</surname><given-names>R</given-names> </name><name name-style="western"><surname>Mifuji-Moroka</surname><given-names>R</given-names> </name><etal/></person-group><article-title>Factors contributing to the development of overt encephalopathy in liver cirrhosis patients</article-title><source>Metab Brain Dis</source><year>2016</year><month>10</month><volume>31</volume><issue>5</issue><fpage>1151</fpage><lpage>1156</lpage><pub-id pub-id-type="doi">10.1007/s11011-016-9862-6</pub-id><pub-id pub-id-type="medline">27353278</pub-id></nlm-citation></ref><ref id="ref26"><label>26</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Formentin</surname><given-names>C</given-names> </name><name name-style="western"><surname>Zarantonello</surname><given-names>L</given-names> </name><name name-style="western"><surname>Mangini</surname><given-names>C</given-names> </name><name name-style="western"><surname>Frigo</surname><given-names>AC</given-names> </name><name name-style="western"><surname>Montagnese</surname><given-names>S</given-names> </name><name name-style="western"><surname>Merkel</surname><given-names>C</given-names> </name></person-group><article-title>Clinical, neuropsychological and neurophysiological indices and predictors of hepatic encephalopathy (HE)</article-title><source>Liver Int</source><year>2021</year><month>05</month><volume>41</volume><issue>5</issue><fpage>1070</fpage><lpage>1082</lpage><pub-id pub-id-type="doi">10.1111/liv.14785</pub-id><pub-id pub-id-type="medline">33411388</pub-id></nlm-citation></ref><ref id="ref27"><label>27</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Verma</surname><given-names>N</given-names> </name><name name-style="western"><surname>Garg</surname><given-names>P</given-names> </name><name name-style="western"><surname>Valsan</surname><given-names>A</given-names> </name><etal/></person-group><article-title>Integrated unsupervised and supervised machine learning unveils and predicts the Clusters with Distinct Profiles and Survival in Acute-on-Chronic Liver Failure (CLUSTER-ACLF)</article-title><source>J Clin Exp Hepatol</source><year>2023</year><volume>13</volume><fpage>S2</fpage><pub-id pub-id-type="doi">10.1016/j.jceh.2023.07.011</pub-id></nlm-citation></ref><ref id="ref28"><label>28</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Malik</surname><given-names>S</given-names> </name><name name-style="western"><surname>Tenorio</surname><given-names>BG</given-names> </name><name name-style="western"><surname>Moond</surname><given-names>V</given-names> </name><name name-style="western"><surname>Dahiya</surname><given-names>DS</given-names> </name><name name-style="western"><surname>Vora</surname><given-names>R</given-names> </name><name name-style="western"><surname>Dbouk</surname><given-names>N</given-names> </name></person-group><article-title>Systematic review of machine learning models in predicting the risk of bleed/grade of esophageal varices in patients with liver cirrhosis: a comprehensive methodological analysis</article-title><source>J Gastroenterol Hepatol</source><year>2024</year><month>10</month><volume>39</volume><issue>10</issue><fpage>2043</fpage><lpage>2059</lpage><pub-id pub-id-type="doi">10.1111/jgh.16645</pub-id><pub-id pub-id-type="medline">38886175</pub-id></nlm-citation></ref><ref id="ref29"><label>29</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>M&#x00FC;ller</surname><given-names>SE</given-names> </name><name name-style="western"><surname>Casper</surname><given-names>M</given-names> </name><name name-style="western"><surname>Ripoll</surname><given-names>C</given-names> </name><etal/></person-group><article-title>Machine learning models predicting decompensation in cirrhosis</article-title><source>J Gastrointestin Liver Dis</source><year>2025</year><month>03</month><day>27</day><volume>34</volume><issue>1</issue><fpage>71</fpage><lpage>80</lpage><pub-id pub-id-type="doi">10.15403/jgld-5876</pub-id><pub-id pub-id-type="medline">40153826</pub-id></nlm-citation></ref><ref id="ref30"><label>30</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Rech</surname><given-names>MM</given-names> </name><name name-style="western"><surname>Corso</surname><given-names>LL</given-names> </name><name name-style="western"><surname>B&#x00F3;</surname><given-names>EFD</given-names> </name><etal/></person-group><article-title>Su1581 prospective validation of a neural network model for the prediction of 1-year mortality in cirrhotic patients with acute esophageal variceal bleeding</article-title><source>Gastroenterology</source><year>2023</year><month>05</month><volume>164</volume><issue>6</issue><fpage>S</fpage><lpage>1341</lpage><pub-id pub-id-type="doi">10.1016/S0016-5085(23)04120-3</pub-id></nlm-citation></ref><ref id="ref31"><label>31</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Soldera</surname><given-names>J</given-names> </name><name name-style="western"><surname>Tom&#x00E9;</surname><given-names>F</given-names> </name><name name-style="western"><surname>Corso</surname><given-names>LL</given-names> </name><etal/></person-group><article-title>590 predicting 30 and 365-day mortality after liver transplantation using a machine learning algorithm</article-title><source>Gastroenterology</source><year>2021</year><month>05</month><volume>160</volume><issue>6</issue><fpage>S</fpage><lpage>789</lpage><pub-id pub-id-type="doi">10.1016/S0016-5085(21)02602-0</pub-id></nlm-citation></ref><ref id="ref32"><label>32</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Yang</surname><given-names>H</given-names> </name><name name-style="western"><surname>Li</surname><given-names>X</given-names> </name><name name-style="western"><surname>Cao</surname><given-names>H</given-names> </name><etal/></person-group><article-title>Using machine learning methods to predict hepatic encephalopathy in cirrhotic patients with unbalanced data</article-title><source>Comput Methods Programs Biomed</source><year>2021</year><month>11</month><volume>211</volume><issue>211</issue><fpage>106420</fpage><pub-id pub-id-type="doi">10.1016/j.cmpb.2021.106420</pub-id><pub-id pub-id-type="medline">34555589</pub-id></nlm-citation></ref><ref id="ref33"><label>33</label><nlm-citation citation-type="confproc"><person-group person-group-type="author"><name name-style="western"><surname>Chen</surname><given-names>T</given-names> </name><name name-style="western"><surname>Guestrin</surname><given-names>C</given-names> </name></person-group><article-title>XGBoost: a scalable tree boosting system</article-title><conf-name>KDD &#x2019;16: The 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining</conf-name><conf-date>Aug 13-17, 2016</conf-date><conf-loc>San Francisco, CA, United States</conf-loc><pub-id pub-id-type="doi">10.1145/2939672.2939785</pub-id></nlm-citation></ref><ref id="ref34"><label>34</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Shwartz-Ziv</surname><given-names>R</given-names> </name><name name-style="western"><surname>Armon</surname><given-names>A</given-names> </name></person-group><article-title>Tabular data: deep learning is not all you need</article-title><source>Inform Fusion</source><year>2022</year><month>05</month><volume>81</volume><fpage>84</fpage><lpage>90</lpage><pub-id pub-id-type="doi">10.1016/j.inffus.2021.11.011</pub-id></nlm-citation></ref><ref id="ref35"><label>35</label><nlm-citation citation-type="confproc"><person-group person-group-type="author"><name name-style="western"><surname>Lundberg</surname><given-names>SM</given-names> </name><name name-style="western"><surname>Lee</surname><given-names>SI</given-names> </name></person-group><article-title>A unified approach to interpreting model predictions</article-title><conf-name>Proceedings of the 31st International Conference on Neural Information Processing Systems</conf-name><conf-date>Dec 4-9, 2017</conf-date><conf-loc>Long Beach, CA, United States</conf-loc><fpage>4768</fpage><lpage>4777</lpage></nlm-citation></ref><ref id="ref36"><label>36</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Tapper</surname><given-names>EB</given-names> </name><name name-style="western"><surname>Parikh</surname><given-names>ND</given-names> </name><name name-style="western"><surname>Sengupta</surname><given-names>N</given-names> </name><etal/></person-group><article-title>A risk score to predict the development of hepatic encephalopathy in a population-based cohort of patients with cirrhosis</article-title><source>Hepatology</source><year>2018</year><month>10</month><volume>68</volume><issue>4</issue><fpage>1498</fpage><lpage>1507</lpage><pub-id pub-id-type="doi">10.1002/hep.29628</pub-id><pub-id pub-id-type="medline">29091289</pub-id></nlm-citation></ref><ref id="ref37"><label>37</label><nlm-citation citation-type="journal"><person-group person-group-type="author"><name name-style="western"><surname>Tapper</surname><given-names>EB</given-names> </name><name name-style="western"><surname>Zhao</surname><given-names>L</given-names> </name><name name-style="western"><surname>Nikirk</surname><given-names>S</given-names> </name><etal/></person-group><article-title>Incidence and bedside predictors of the first episode of overt hepatic encephalopathy in patients with cirrhosis</article-title><source>Am J Gastroenterol</source><year>2020</year><month>12</month><volume>115</volume><issue>12</issue><fpage>2017</fpage><lpage>2025</lpage><pub-id pub-id-type="doi">10.14309/ajg.0000000000000762</pub-id><pub-id pub-id-type="medline">32773463</pub-id></nlm-citation></ref></ref-list><app-group><supplementary-material id="app1"><label>Multimedia Appendix 1</label><p>Supplementary tables.</p><media xlink:href="medinform_v13i1e71229_app1.docx" xlink:title="DOCX File, 22 KB"/></supplementary-material><supplementary-material id="app2"><label>Checklist 1</label><p>TRIPOD (Transparent Reporting of a Multivariable Prediction Model for Individual Prognosis or Diagnosis) checklist.</p><media xlink:href="medinform_v13i1e71229_app2.pdf" xlink:title="PDF File, 176 KB"/></supplementary-material></app-group></back></article>