Machine learning vs. regression models to predict the risk of Legionella contamination in a hospital water network - De Giglio, Osvalda; Fasano, Fabrizio; Diella, Giusy; Spagnuolo, Valentina; Triggiano, Francesco; Lopuzzo, Marco; Apollonio, Francesca; Leone, Carla Maria; Montagna, Maria Teresa (Annali di Igiene Medicina Preventiva e di Comunità, 2025)
Introduction. The periodic monitoring of Legionella in hospital water networks allows preventive measures to be taken to avoid the risk of legionellosis to patients and healthcare workers. Study design. The aim of the study is to standardize a method for predicting the risk of Legionella contamination in the water supply of a hospital facility, by comparing Machine Learning, conventional and combined models. Methods. During the period July 2021– October 2022, water sampling for Legionella detection was performed in the rooms of an Italian hospital pavilion (89.9% of the total number of rooms). Fifty-eight parameters regarding the structural and environmental characteristics of the water network were collected. Models were built on 70% of the dataset and tested on the remaining 30% to evaluate accuracy, sensitivity, and specificity. Results. A total of 1,053 water samples were analyzed and 57 (5.4%) were positive for Legionella. Of the Machine Learning models tested, the most efficient had an input layer (56 neurons), hidden layer (30 neurons), and output layer (two neurons). Accuracy was 93.4%, sensitivity was 43.8%, and specificity was 96%. The regression model had an accuracy of 82.9%, sensitivity of 20.3%, and specificity of 97.3%. The combination of the models achieved an accuracy of 82.3%, sensitivity of 22.4%, and specificity of 98.4%. The most important parameters that influenced the model results were the type of water network (hot/cold), the replacement of filter valves, and atmospheric temperature. Among the models tested, Machine Learning obtained the best results in terms of accuracy and sensitivity. Conclusions. Future studies are required to improve these predictive models by expanding the dataset using other parameters and other pavilions of the same hospital.