Related Experiment Video
Updated: Jul 9, 2025

Colorimetric Paper-based Detection of Escherichia coli, Salmonella spp., and Listeria monocytogenes from Large Volumes of Agricultural Water
Published on: June 9, 2014
Oversampling methods for machine learning model data training to improve model capabilities to predict the presence
Jacob A Stanosheck1, M Elena Castell-Perez1, Rosana G Moreira1
1Department of Biological and Agricultural Engineering, Texas A&M University, College Station, Texas, USA.
Abstract:
We 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.

