Machine Learning Model to Predict Recurrent Ulcer Bleeding in Patients With History of Idiopathic Gastroduodenal Ulcer Bleeding

Grace Lai-Hung Wong; Andy Jinhua Ma; Huiqi Deng; Jessica Yuet-Ling Ching; Vincent Wai-Sun Wong; Yee-Kit Tse; Terry Cheuk-Fung Yip; Louis Ho-Shing Lau; Henry Hin-Wai Liu; Chi-Man Leung; Steven Woon-Choy Tsang; Chun-Wing Chan; James Yun-Wong Lau; Pong-Chi Yuen; Francis Ka-Leung Chan


Aliment Pharmacol Ther. 2019;49(7):912-918. 

In This Article

Abstract and Introduction


Background: Patients with a history of Helicobacter pylori–negative idiopathic bleeding ulcers have an increased risk of recurring ulcer complications.

Aim: To build a machine learning model to identify patients at high risk for recurrent ulcer bleeding.

Methods: Data from a retrospective cohort of 22 854 patients (training cohort) diagnosed with peptic ulcer disease in 2007–2016 were analysed to build a model (IPU-ML) to predict recurrent ulcer bleeding. We tested the IPU-ML in all patients with a diagnosis of gastrointestinal bleeding (n = 1265) in 2008–2015 from a different catchment population (independent validation cohort). Any co-morbid conditions which had occurred in >1% of study population were eligible as predictors.

Results: Recurrent ulcer bleeding developed in 4772 patients (19.5%) in the training cohort, during a median follow-up period of 2.7 years. IPU-ML model built on six parameters (age, baseline haemoglobin, and presence of gastric ulcer, gastrointestinal diseases, malignancies, and infections) identified patients with bleeding recurrence within 1 year with an area under the receiver operating characteristic curve (AUROC) of 0.648. When we set the IPU-ML cutoff value at 0.20, 27.5% of patients were classified as high risk for rebleeding with a sensitivity of 41.4%, specificity of 74.6%, and a negative predictive value of 91.1%. In the validation cohort, the IPU-ML identified patients with a recurrence ulcer bleeding within 1 year with an AUROC of 0.775, and 84.3% of overall accuracy.

Conclusion: We developed a machine-learning model to identify those patients with a history of idiopathic gastroduodenal ulcer bleeding who are not at high risk for recurrent ulcer bleeding.


Idiopathic gastroduodenal peptic ulcer disease, which developed in the absence of Helicobacter pylori (H. pylori) infection or use of nonsteroidal anti-inflammatory drugs (NSAIDs) including low-dose aspirin, is now recognised as a distinct disease entity.[1] Up to 44% of peptic ulcers were found to be idiopathic in North America.[2–4] On the other hand, up to 20% of patients with H. pylori-associated ulcers developed recurrent ulcers within 6 months after successful H. pylori eradication in the absence of NSAID use, which implies these recurrent ulcers were likely idiopathic.[5] This unique type of idiopathic ulcer is similarly emerging in Asia, accounting for less than 5% of peptic ulcers in late 1990s[6] to 18.8% in Hong Kong a decade later.[7]

Patients with a history of idiopathic gastroduodenal ulcer bleeding have a poor prognosis because of high rates of recurrent ulcer bleeding and mortality.[8,9] Accurate risk prediction of these poor clinical outcomes would be important to optimise the management plan for patients at high risk of recurrent ulcer bleeding. While most clinical risk prediction models were developed using traditional regression analysis, machine learning arisen in recent years is a strongly competitive alternative. Machine learning is a comprehensive tool arisen in recent years for model development, allows direct selection of predicting parameters among all available parameters without subjective preselection, and maximises data use while minimises bias. Machine learning is used to improve the diagnosis of non-alcoholic fatty liver disease from electronic medical record data.[10] In this study, we aimed to develop a novel clinical and laboratory parameter-based prediction model using machine learning algorithm to predict recurrent ulcer bleeding in patients with a history of H. pylori–negative idiopathic bleeding ulcers.