ObjectiveFalls are adverse events which commonly occur in hospitalized patients. Inpatient falls may cause bruises or contusions and even a fractures or head injuries, which can lead to significant physical and economic burdens for patients and their families. Therefore, it is important to predict the risks involved surrounding hospitalized patients falling in order to better provide medical personnel with effective fall prevention measures.SettingThis study retrospectively used EHR data taken from the Taichung Veterans General Hospital clinical database between January 2015 and December 2019.ParticipantsA total of 53,122 patient records were collected in this study, of which 1,157 involved fall patients and 51,965 were non-fall patients.Primary and secondary outcome measureThis study integrated the characteristics and clinical data of patients with falls and without falls using RapidMiner Studio as an analysis tool for various models of artificial intelligence. Utilization of 8 differ models to identify the most important factors surrounding inpatient fall risk. This study used the sensitivity, specificity, and area under the ROC curve to compute the data by 5-fold cross-validation and then compared them by pairwise t-tests.ResultsThe predictive classifier was developed based upon the gradient boosted trees (XGBoost) model which outperformed the other seven baseline models and achieved a cross-validated ACC of 95.11%, AUC of 0.990, F1 score of 95.1%. These results show that the XGBoost model was used when dealing with multisource patient data, which in this case delivered a highly predictive performance on the risk of inpatient falls.ConclusionMachine learning methods identify the most important factors regarding the detection of inpatients who are at risk of falling, which in turn would improve the quality of patient care and reduce the workloads of the nursing staff when making fall assessments.