Affiliation:
1. Department of Biological and Agricultural Engineering Texas A&M University College Station Texas USA
2. Department of Food Science and Technology Texas A&M University College Station Texas USA
Abstract
AbstractWe assessed the efficacy of oversampling techniques to enhance machine learning model performance in predicting Escherichia coli MG1655 presence in spinach wash water. Three oversampling methods were applied to balance two datasets, forming the basis for training random forest (RF), support vector machines (SVMs), and binomial logistic regression (BLR) models. Data underwent method‐specific centering and standardization, with outliers replaced by feature‐specific means in training datasets. Testing occurred without these preprocessing steps. Model hyperparameters were optimized using a subset of testing data via 10‐fold cross‐validation. Models were trained on full datasets and tested on newly acquired spinach wash water samples. Synthetic Minority Oversampling Technique (SMOTE) and Adaptive Synthetic Sampling approach (ADASYN) achieved strong results, with SMOTE RF reaching an accuracy of 90.0%, sensitivity of 93.8%, specificity of 87.5%, and an area under the curve (AUC) of 98.2% (without data preprocessing) and ADASYN achieving 86.55% accuracy, 87.5% sensitivity, 83.3% specificity, and a 92.4% AUC. SMOTE and ADASYN significantly improved (p < 0.05) SVM and RF models, compared to their non‐oversampled counterparts without preprocessing. Data preprocessing had a mixed impact, improving (p < 0.05) the accuracy and specificity of the BLR model but decreasing the accuracy and specificity (p < 0.05) of the SVM and RF models. The most influential physiochemical feature for E. coli detection in wash water was water conductivity, ranging from 7.9 to 196.2 µS. Following closely was water turbidity, ranging from 2.97 to 72.35 NTU within this study.