Detection of Peanut Contamination in Wheat Flour Using a Digital Light Processing ( <scp>DLP</scp> ) Based Near‐Infrared Spectrometer and Ensemble Machine Learning
Bibliographic record
Abstract
ABSTRACT Peanut flour contamination poses significant health and regulatory challenges within food production systems, often originating from adulterated raw materials or cross‐contamination during processing. Rapid and non‐destructive detection methods are essential for real‐time monitoring and mitigation. This study aimed to develop a non‐destructive detection system using a portable digital light processing (DLP) based near‐infrared (NIR) spectrometer integrated with machine learning (ML) models to identify and quantify peanut adulteration in wheat flour. Samples were systematically prepared by blending wheat flour with peanut flour at six contamination levels: 0%, 2%, 4%, 6%, 8%, and 10% (w/w). Spectral data were acquired using a handheld DLP‐NIR device operating in the 900–1700 nm range. Due to limited separability among contamination levels, a binary classification framework was adopted to distinguish pure wheat flour (0%) from contaminated samples (≥ 2%) using models such as Linear Discriminant Analysis, Logistic Regression, and boosted tree ensembles. Regression models including Extra Trees, Random Forest, and LightGBM were trained to estimate contamination levels. Spectral preprocessing involved normalization and Yeo‐Johnson transformation, while model evaluation employed stratified K‐fold cross‐validation with Optuna‐based hyperparameter tuning. The top five performing classifiers were selected for ensemble learning to enhance predictive performance. The final ensemble classifier achieved accuracy, precision, recall, and F1‐score values of 0.9937, 0.9976, 0.9948, and 0.9962, respectively. Ensemble regressors yielded R 2 = 0.7477, RMSE = 1.7157, and MAE = 1.148, demonstrating promising semi‐quantitative estimation capabilities. These results highlight the feasibility of combining portable NIR spectroscopy with ensemble ML for rapid, in‐line detection of peanut contamination in wheat flour.
Fetched live from OpenAlex and de-inverted. Abstracts are not stored in this database: the inverted indexes are 8.6 GB of the frame’s 9.3 GB of text, and the host has 13 GB free.
How this classification was reachedexpand
Full frame machine prediction
Teacher imitationNot calibrated prevalence, not ground truth. Human validation pending. The Gemma side is a direct model label for every work in the frame, read from the title-only record. The Codex side is a classifier learned from the 10,348 direct Codex labels and calibrated to design-weighted sample rates; fields without enough sample support carry no Codex call. Candidate is the union of the two sides; consensus is their intersection. These outputs are machine_predicted_unvalidated and are not human labels.
Distilled classifier scores by category (both heads)
| Category | Codex | Gemma |
|---|---|---|
| Metaresearch | 0.000 | 0.000 |
| Meta-epidemiology (narrow) | 0.000 | 0.000 |
| Meta-epidemiology (broad) | 0.000 | 0.000 |
| Bibliometrics | 0.000 | 0.000 |
| Science and technology studies | 0.000 | 0.000 |
| Scholarly communication | 0.000 | 0.000 |
| Open science | 0.000 | 0.000 |
| Research integrity | 0.000 | 0.000 |
| Insufficient payload (model declined to judge) | 0.000 | 0.000 |
Machine scores (provisional)
The two teacher heads of the student model, read on this work. A score orders the frame for review; it never asserts a category, and the validation status ships verbatim with every row.
Baseline scores from an immature model (maturity gate not passed, 7 training rounds). Scores rank; they never assert a category.
score_only:v0-immature-baseline · verbatim from the scoring run: score_only means the number may rank works, and no category label ships from itClassification
machine, unvalidatedMachine predicted; a candidate call from one source (direct Gemma or distilled Codex), not a consensus.
How this classification was reached, model by model and score by score, is at the end of the page under "How this classification was reached".