Development and validation of an interpretable machine learning model for predicting the risk of hepatocellular carcinoma in patients with chronic hepatitis B: a case-control study.
Linghong Wu, Zengjing Liu, Hongyuan Huang, Dongmei Pan, Cuiping Fu, Yao Lu, Min Zhou, Kaiyong Huang, TianRen Huang, Li Yang
{"title":"Development and validation of an interpretable machine learning model for predicting the risk of hepatocellular carcinoma in patients with chronic hepatitis B: a case-control study.","authors":"Linghong Wu, Zengjing Liu, Hongyuan Huang, Dongmei Pan, Cuiping Fu, Yao Lu, Min Zhou, Kaiyong Huang, TianRen Huang, Li Yang","doi":"10.1186/s12876-025-03697-2","DOIUrl":null,"url":null,"abstract":"<p><strong>Background: </strong>The aim of this study was to develop and internally validate an interpretable machine learning (ML) model for predicting the risk of hepatocellular carcinoma (HCC) in patients with chronic hepatitis B (CHB) infection.</p><p><strong>Methods: </strong>We retrospectively collected clinical data from patients with HCC and CHB treated at the Fourth Affiliated Hospital of Guangxi Medical University from January 2022 to December 2022, including demographics, comorbidities, and laboratory parameters. The datasets were randomly divided into a training set (361 cases) and a validation set (155 cases) in a 7:3 ratio. Variables were screened using Least Absolute Shrinkage and Selection Operator (LASSO) and multifactor logistic regression. The prediction model of HCC risk in CHB patients was constructed based on five machine learning models, including logistic regression (LR), K-nearest neighbour (KNN), support vector machine (SVM), random forest (RF) and artificial neural network (ANN). Receiver operating characteristic (ROC) curve, calibration curve and decision curve analysis (DCA) were used to evaluate the predictive performance of the model in terms of identification, calibration and clinical application. The SHapley Additive exPlanation (SHAP) method was used to rank the importance of the features and explain the final model.</p><p><strong>Results: </strong>Among the five ML models constructed, the RF model has the best performance, and the RF model predicts the risk of HCC in patients with CHB in the training set [AUC: 0.996, 95% confidence interval (CI) (0.991-0.999)] and internal validation set [AUC: 0.993, 95% CI (0.986-1.000)]. It has high AUC, specificity, sensitivity, F1 score and low Brier score. Calibration showed good agreement between observed and predicted risks. The model yielded higher positive net benefits in DCA than when all participants were considered to be at high or low risk, indicating good clinical utility. In addition, the SHAP plot of the RF showed that age, basophil/lymphocyte ratio (BLR), D-Dimer, aspartate aminotransferase/alanine aminotransferase (AST/ALT), γ-glutamyltransferase (GGT) and alpha-fetoprotein (AFP) can help identify patients with CHB who are at high or low risk of developing HCC.</p><p><strong>Conclusion: </strong>ML models can be used as a tool to predict the risk of HCC in patients with CHB. The RF model has the best predictive performance and helps clinicians to identify high-risk patients and intervene early to reduce or delay the occurrence of HCC. However, the model needs to be further improved through large sample studies.</p>","PeriodicalId":9129,"journal":{"name":"BMC Gastroenterology","volume":"25 1","pages":"157"},"PeriodicalIF":2.5000,"publicationDate":"2025-03-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC11899164/pdf/","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"BMC Gastroenterology","FirstCategoryId":"3","ListUrlMain":"https://doi.org/10.1186/s12876-025-03697-2","RegionNum":3,"RegionCategory":"医学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"GASTROENTEROLOGY & HEPATOLOGY","Score":null,"Total":0}
引用次数: 0
Abstract
Background: The aim of this study was to develop and internally validate an interpretable machine learning (ML) model for predicting the risk of hepatocellular carcinoma (HCC) in patients with chronic hepatitis B (CHB) infection.
Methods: We retrospectively collected clinical data from patients with HCC and CHB treated at the Fourth Affiliated Hospital of Guangxi Medical University from January 2022 to December 2022, including demographics, comorbidities, and laboratory parameters. The datasets were randomly divided into a training set (361 cases) and a validation set (155 cases) in a 7:3 ratio. Variables were screened using Least Absolute Shrinkage and Selection Operator (LASSO) and multifactor logistic regression. The prediction model of HCC risk in CHB patients was constructed based on five machine learning models, including logistic regression (LR), K-nearest neighbour (KNN), support vector machine (SVM), random forest (RF) and artificial neural network (ANN). Receiver operating characteristic (ROC) curve, calibration curve and decision curve analysis (DCA) were used to evaluate the predictive performance of the model in terms of identification, calibration and clinical application. The SHapley Additive exPlanation (SHAP) method was used to rank the importance of the features and explain the final model.
Results: Among the five ML models constructed, the RF model has the best performance, and the RF model predicts the risk of HCC in patients with CHB in the training set [AUC: 0.996, 95% confidence interval (CI) (0.991-0.999)] and internal validation set [AUC: 0.993, 95% CI (0.986-1.000)]. It has high AUC, specificity, sensitivity, F1 score and low Brier score. Calibration showed good agreement between observed and predicted risks. The model yielded higher positive net benefits in DCA than when all participants were considered to be at high or low risk, indicating good clinical utility. In addition, the SHAP plot of the RF showed that age, basophil/lymphocyte ratio (BLR), D-Dimer, aspartate aminotransferase/alanine aminotransferase (AST/ALT), γ-glutamyltransferase (GGT) and alpha-fetoprotein (AFP) can help identify patients with CHB who are at high or low risk of developing HCC.
Conclusion: ML models can be used as a tool to predict the risk of HCC in patients with CHB. The RF model has the best predictive performance and helps clinicians to identify high-risk patients and intervene early to reduce or delay the occurrence of HCC. However, the model needs to be further improved through large sample studies.
期刊介绍:
BMC Gastroenterology is an open access, peer-reviewed journal that considers articles on all aspects of the prevention, diagnosis and management of gastrointestinal and hepatobiliary disorders, as well as related molecular genetics, pathophysiology, and epidemiology.