Random forest models of food safety behavior during the COVID-19 pandemic

Int J Environ Health Res. 2024 May 17:1-13. doi: 10.1080/09603123.2024.2354441. Online ahead of print.

Abstract

Machine learning approaches are increasingly being adopted as data analysis tools in scientific behavioral predictions. This paper utilizes a machine learning approach, Random Forest Model, to determine the top prediction variables of food safety behavioral changes during the pandemic. Data was collected among U.S. consumers on risk perception of COVID-19 and foodborne illness (FBI), food safety practice behaviors and demographics through online surveys at ten different time points from April 2020 through to May 2021; and post pandemic in May 2022. Random forest model was used to predict 14 food safety-related behaviors. The models for predicting Handwashing before cooking and Handwashing after eating had a good performance, with F-1 score of 0.93 and 0.88, respectively. Attitudes- related variables were determined to be important in predicting food safety behaviors. The importance ranking of the predicting variables were found to be changing over time.

Keywords: COVID-19; Random forest; food safety; modelling; predicting variables.