Introduction: Treatment of upper gastrointestinal bleeding (UGIB) is a complex challenge due to the wide range of causes and factors affecting hospitalization outcomes.Objective: To study the impact of various factors on 30-day hospital outcomes using machine learning (ML) tools.Materials and methods: We compiled a retrospective data set that includes clinical, laboratory, and imaging data of 101 patients. The database was divided into 2 groups by UGIB etiology: ulcer and variceal bleedings. Both etiological groups were processed using ML tools in 2 steps: imputation by the MICE (multiple imputation by chained equations) model and factor importance analysis using the Random Forest model.Results: Analysis revealed that the most prognostically valuable parameters in both groups were well-known mortality predictors and emerging predictive factors, such as creatinine, blood pressure, activated partial thromboplastin time, level of consciousness, urea, lactate, comorbidity status, procalcitonin, ferritin, and total protein.Conclusions: The application of advanced tools confirmed the significance of popular and validated mortality predictors and contributed to the development of predictors, both explored and unexplored ones.