Machine-Learning-Algorithm-Assisted Portable Miniaturized NIR Spectrometer for Rapid Evaluation of Wheat Flour Processing Applicability
Abstract
:1. Introduction
2. Materials and Methods
2.1. Flour Preparation
2.2. NIR Calibration and Acquisition
2.3. Measurement of SV and FN
2.4. Machine Learning Modeling and Performance Evaluation
2.5. Wavelength Selection and Model Simplification
2.6. Independent Validation
2.7. Two-Sample F-Test and t-Test
3. Results and Discussions
3.1. NIR Features of Wheat Flour
3.2. Statistical Results Regarding SV and FN
3.3. SOA-SVR Modeling for Quantifying SV and FN Using Full-Band Spectra
3.4. Selection of MIWs Through PCA, SPA, iWOA, and RFE
3.5. SOA-SVR Modeling for Quantifying SV and FN Using MIWs
3.6. Simplified SOA-SVR Model Validation Using Independent Samples
3.7. Two-Sample Test
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- FAO/FAOSTAT. Statistics division of Food and Agriculture Organization of the United Nations. 2023. Available online: https://www.fao.org/faostat/en/#data/QCL/visualize (accessed on 1 January 2024).
- Arzani, A.; Ashraf, M. Cultivated ancient wheats (Triticum spp.): A potential source of health-beneficial food products. Compr. Rev. Food Sci. Food Saf. 2017, 16, 477–488. [Google Scholar] [CrossRef] [PubMed]
- Atwell, W.A.; Finnie, S. Wheat Flour; Elsevier: Amsterdam, The Netherlands, 2016. [Google Scholar]
- Zhang, S.; Liu, S.; Shen, L.; Chen, S.; He, L.; Liu, A. Application of near-infrared spectroscopy for the nondestructive analysis of wheat flour: A review. Curr. Res. Food Sci. 2022, 5, 1305–1312. [Google Scholar] [CrossRef] [PubMed]
- Zareef, M.; Arslan, M.; Hassan, M.M.; Ahmad, W.; Ali, S.; Li, H.; Ouyang, Q.; Wu, X.; Hashim, M.M.; Chen, Q. Recent advances in assessing qualitative and quantitative aspects of cereals using nondestructive techniques: A review. Trends Food Sci. Technol. 2021, 116, 815–828. [Google Scholar] [CrossRef]
- Ferreira, M.D.P.K.; Ribeiro, V.A.D.G.; Barros, J.H.T.; Steel, C.J. Strategies to improve the quality of wheat flour in baking: A review. Braz. J. Food Technol. 2025, 28, e2024046. [Google Scholar] [CrossRef]
- Wang, Y.; Guo, Z.; Chen, Q.; Li, Y.; Zhao, K.; Wan, Y.; Qi, P.F. Effect of high-molecular-weight glutenin subunit Dy10 on wheat dough properties and end-use quality. J. Integr. Agric. 2023, 22, 1609–1617. [Google Scholar] [CrossRef]
- Kaur, A.; Singh, N.; Ahlawat, A.K.; Kaur, S.; Singh, A.M.; Chauhan, H.; Singh, G.P. Diversity in grain, flour, dough and gluten properties amongst Indian wheat cultivars varying in high molecular weight subunits (HMW-GS). Food Res. Int. 2013, 53, 63–72. [Google Scholar] [CrossRef]
- Szafranska, A. Comparison of alpha-amylase activity of wheat flour estimated by traditional and modern techniques. Agr. Food Sci. 2014, 21, 493–505. Available online: https://api.semanticscholar.org/CorpusID:92112399 (accessed on 1 November 2014).
- Kweon, M.; Slade, L.; Levine, H. Impacts of weathering/preharvest sprouting in the field on the milling and flour quality of soft wheats, and resulting baking performance for soft wheat-based baked products. Cereal Chem. 2023, 100, 83–98. [Google Scholar] [CrossRef]
- Liang, W.Z.; Tang, Y.N.; Liu, J.H.; Guo, X.J.; Dong, H.X.; Qi, P.F.; Wang, J. Effect of Flour and Cooking/Baking Qualities by Sprouted Wheat. Sci. Agric. Sin. 2024, 57, 1267–1280. [Google Scholar] [CrossRef]
- Acar, O.; Koksel, H. A study on the estimation of dough sheeting behaviour and textural properties of baklava from commercial flour properties. J. Cereal Sci. 2023, 110, 103647. [Google Scholar] [CrossRef]
- Saka, I.; Topcam, H.; Son, E.; Ozkaya, B.; Erdogdu, F. Effect of radio frequency processing on physical, chemical, rheological and bread-baking properties of white and whole wheat flour. LWT 2021, 147, 111563. [Google Scholar] [CrossRef]
- Patil, S.S.; Vedashree, M.; Sakhare, S.D.; Murthy, P.S. Coffee leaf valorisation into functional wheat flour rusk: Their nutritional, physicochemical, and sensory properties. J. Food Sci. Technol. 2024, 61, 1117–1125. [Google Scholar] [CrossRef] [PubMed]
- Fodor, M.; Matkovits, A.; Benes, E.L.; Jókai, Z. The role of near-infrared spectroscopy in food quality assurance: A review of the past two decades. Foods 2024, 13, 3501. [Google Scholar] [CrossRef] [PubMed]
- Denise, D.M.B.D.S.; Francisco, I.C.; Raniero, G.Z.; Monteiro, C.C.F.; Rossoni, D.F.; Monteiro, A.R.G. Application of NIR for rapid determination of flour quality by machine learning. Chem. Eng. Trans. 2023, 101, 193–198. [Google Scholar] [CrossRef]
- Nagel-Held, J.; Kaiser, L.; Longin, C.F.H.; Hitzmann, B. Prediction of wheat quality parameters combining Raman, fluorescence, and near-infrared spectroscopy (NIRS). Cereal Chem. 2022, 99(4), 830–842. [Google Scholar] [CrossRef]
- Kucha, C.; Olaniyi, E.O.; Ngadi, M. Miniaturized hand-held near-infrared spectroscopy and machine learning for precision monitoring of solid fat content. J. Food Meas. Charact. 2024, 18, 4417–4428. [Google Scholar] [CrossRef]
- Yang, Y.; Sun, R.; Li, H.; Qin, Y.; Zhang, Q.; Lv, P.; Pan, Q. Lightweight deep learning algorithm for real-time wheat flour quality detection via NIR spectroscopy. Spectrochim. Acta A 2024, 330, 125653. [Google Scholar] [CrossRef]
- Dong, X.; Dong, Y.; Liu, J.; Wang, C.; Bao, C.; Wang, N.; Zhao, X.; Chen, Z. Identification and quantitative detection of illegal additives in wheat flour based on near-infrared spectroscopy combined with chemometrics. Spectrochim. Acta A 2024, 323, 124938. [Google Scholar] [CrossRef]
- Du, C.; Sun, L.; Bai, H.; Zhao, Z.; Wang, J.; Bai, S. Detection of talcum powder content in wheat flour by near infrared spectroscopy based on multilevel feature selection. J. Chemom. 2022, 36, e3451. [Google Scholar] [CrossRef]
- Du, C.; Sun, L.; Bai, H.; Zhao, Z.; Li, X.; Gai, Z. Quantitative detection of talcum powder in wheat flour based on near-infrared spectroscopy and hybrid feature selection. Infrared Phys. Technol. 2022, 123, 104185. [Google Scholar] [CrossRef]
- Jiang, H.; Liu, T.; Chen, Q. Quantitative detection of fatty acid value during storage of wheat flour based on a portable near-infrared (NIR) spectroscopy system. Infrared Phys. Technol. 2020, 109, 103423. [Google Scholar] [CrossRef]
- Awad, M.; Khanna, R. Support Vector Regression. In Efficient Learning Machines: Theories, Concepts, and Applications for Engineers and System Designers; Springer: Berlin/Heidelberg, Germany, 2015; pp. 67–80. [Google Scholar]
- Shafiee, S.; Lied, L.M.; Burud, I.; Dieseth, J.A.; Alsheikh, M.; Lillemo, M. Sequential forward selection and support vector regression in comparison to LASSO regression for spring wheat yield prediction based on UAV imagery. Comput. Electron. Agr. 2021, 183, 106036. [Google Scholar] [CrossRef]
- Su, Y.; He, K.; Liu, W.; Li, J.; Hou, K.; Lv, S.; He, X. Detection of soluble solid content in table grapes during storage based on visible-near-infrared spectroscopy. Food Innov. Adv. 2025, 4, 10–18. [Google Scholar] [CrossRef]
- Zhong, C.; Li, G.; Meng, Z.; Li, H.; Yildiz, A.R.; Mirjalili, S. Starfish optimization algorithm (SFOA): A bio-inspired metaheuristic algorithm for global optimization compared with 100 optimizers. Neural Comput. Appl. 2024, 37, 3641–3683. [Google Scholar] [CrossRef]
- Pika, A.K. Yield and quality prediction of winter rapeseed—Artificial neural network and random forest models. Agronomy 2021, 12, 58. [Google Scholar] [CrossRef]
- Rajkovi, D.; Jeromela, A.M.; Pika, G.A.K. Artificial neural network and random forest regression models for modelling fatty acid and tocopherol content in oil of winter rapeseed. J. Food Compos. Anal. 2023, 115, 105020. [Google Scholar] [CrossRef]
- Kim, H.J.; Ryu, J.; Kim, G.; Jo, C. Enhancement of non-destructive chicken freshness prediction using Vis/NIR spectroscopy through wavelength selection and data augmentation. LWT 2025, 221, 117602. [Google Scholar] [CrossRef]
- Ranjan, R.; Kumar, N.; Kiranmayee, A.H.; Panchariya, P.C. Characterization of edible oils using NIR spectroscopy and chemometric methods. In Intelligent Systems Design and Applications; Abraham, A., Cherukuri, A., Melin, P., Gandhi, N., Eds.; Springer: Berlin/Heidelberg, Germany, 2020; pp. 292–300. [Google Scholar] [CrossRef]
- Ye, S.; Wang, D.; Min, S. Successive projections algorithm combined with uninformative variable elimination for spectral variable selection. Chemom. Intell. Lab. Syst. 2008, 91, 194–199. [Google Scholar] [CrossRef]
- Mirjalili, S.; Lewis, A. The whale optimization algorithm. Adv. Eng. Softw. 2016, 95, 51–67. [Google Scholar] [CrossRef]
- Wang, Z.; Gao, M. Selection of near infrared spectral wavelength variables based on improved whale optimization algorithm and its application. J. Instrum. Anal. 2023, 42, 37–44. [Google Scholar] [CrossRef]
- Xiong, L.; An, J.; Hou, Y.; Hu, C.; Wang, H.; Chen, Y.; Tang, X. Improved support vector regression recursive feature elimination based on intragroup representative feature sampling (IRFS-SVR-RFE) for processing correlated gas sensor data. Sensors Actuat. B. Chem. 2024, 419, 136395. [Google Scholar] [CrossRef]
- Kuhn, M.; Johnson, K. Over-Fitting and Model Tuning. In Applied Predictive Modeling; Springer: Berlin/Heidelberg, Germany, 2013; pp. 61–92. [Google Scholar]
- He, H.J.; Chen, Y.; Li, G.; Wang, Y.; Ou, X.; Guo, J. Hyperspectral imaging combined with chemometrics for rapid detection of talcum powder adulterated in wheat flour. Food Control 2023, 144, 109378. [Google Scholar] [CrossRef]
- He, H.J.; da Silva Ferreira, M.V.; Wu, Q.; Karami, H.; Kamruzzaman, M. Portable and miniature sensors in supply chain for food authentication: A review. Crit. Rev. Food Sci. 2024, 1–21. [Google Scholar] [CrossRef]
- He, H.J.; Wang, Y.; Wang, Y.; Ou, X.; Liu, H.; Zhang, M. Towards achieving online prediction of starch in postharvest sweet potato [Ipomoea batatas (L.) Lam] by NIR combined with linear algorithm. J. Food Compos. Anal. 2023, 118, 105220. [Google Scholar] [CrossRef]
- Jiang, S.; He, H.J.; Ma, H.; Chen, F.; Xu, B.; Liu, H.; Zhao, S. Quick assessment of chicken spoilage based on hyperspectral NIR spectra combined with partial least squares regression. Int. J. Agr. Biol. Eng. 2021, 14, 243–250. [Google Scholar] [CrossRef]
- Chen, X.; Siesler, H.W.; Yan, H. Rapid analysis of wheat flour by different handheld near-infrared spectrometers: A discussion of calibration model maintenance and performance comparison. Spectrochim. Acta A 2021, 252, 119504. [Google Scholar] [CrossRef]
- Zhou, W.; Lei, Y.; Zhou, Q.; Xu, J.; Xun, H.; Xu, C. A rapid determination of wheat flours components based on near infrared spectroscopy and chemometrics. Vib. Spectrosc. 2024, 130, 103650. [Google Scholar] [CrossRef]
- Lancelot, E.; Fontaine, J.; Grua-Priol, J.; Le-Bail, A. Effect of long-term storage conditions on wheat flour and bread baking properties. Food Chem. 2021, 346, 128902. [Google Scholar] [CrossRef]
Index | NIR Range | Modeling Methods | Accuracy | Year | Literature |
---|---|---|---|---|---|
Protein Moisture | 400–2500 nm | LGAKNet | R2P = 0.9653–0.9683 RMSEP = 0.2886–0.3016 g/100 g RPD = 5.1046–5.8981 | 2024 | [19] |
Azodicarbonamide Talcum powder Gypsum powder | 11,542–3946 cm−1 | CNN-SVM | R2P = 0.9226–0.9786 RMSEP = 0.0024–1.6506% RPD = 3.5852–6.8368 | 2024 | [20] |
Azodicarbonamide | 400–2500 nm | GBDT | R2P = 0.9778 RMSEP = 0.8905% RPD = 6.8099 | 2022 | [21] |
Azodicarbonamide | 400–2500 nm | BRR | R2P = 0.9802 RMSEP = 0.8914% RPD = 6.9263 | 2022 | [22] |
Fatty acid value | 899.22–1724 nm | ELM | R2P ≥ 0.96 RMSEP ≤ 1.0677 mg KOH/100 g | 2020 | [23] |
Index | Training/Prediction Dataset | Number of Wavelengths | Model | Optimal Value of SVR Hyperparameters | Cross-Validation Performance | Predictive Performance | Training Time (s) | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
C | ε | γ | RCV | RMSECV | RP | RMSEP | RPD | |||||
SV | 737/184 (80%/20%) | 360 | SOA-SVR | 27.5879 | 0.1117 | 0.0032 | 0.9654 | 0.2313 | 0.9752 | 0.2138 | 4.5144 | 56.6724 |
RF | — | — | — | 0.9080 | 0.2999 | 0.9149 | 0.2856 | 3.4295 | 36.2069 | |||
ANN | — | — | — | 0.9168 | 0.2863 | 0.9302 | 0.2586 | 3.7871 | 1.2409 | |||
20 | PCA-SOA-SVR | 26.0758 | 0.3452 | 0.5789 | 0.9038 | 0.3026 | 0.9088 | 0.2873 | 3.3124 | 24.2079 | ||
iWOA/SPA-SOA-SVR | 7.7651 | 0.2816 | 0.2451 | 0.9586 | 0.2738 | 0.9605 | 0.2687 | 3.5930 | 53.8704 | |||
FN | 723/181 (80%/20%) | 360 | SOA-SVR | 314.5539 | 0.1862 | 0.0010 | 0.9333 | 0.2909 | 0.9497 | 0.2930 | 3.1940 | 72.1404 |
RF | — | — | — | 0.7153 | 0.5296 | 0.7364 | 0.5325 | 1.9479 | 36.5129 | |||
ANN | — | — | — | 0.8680 | 0.3605 | 0.8557 | 0.3686 | 2.6332 | 1.2204 | |||
30 | PCA-SOA-SVR | 887.69 | 0.7946 | 0.001 | 0.7396 | 0.4912 | 0.7471 | 0.4795 | 1.9888 | 23.1074 | ||
RFE/iWOA-SOA-SVR | 23.8939 | 0.2424 | 0.0485 | 0.9218 | 0.3643 | 0.9224 | 0.3615 | 2.5894 | 50.1561 |
Index | Method | MIWs | Wavelength Reduction |
---|---|---|---|
SV | PCA | 908, 1107, 1199, 1416, 1520, 1528, 1545, 1547, 1575, 1611, 1613, 1627, 1629, 1633, 1645, 1655, 1657, 1660, 1662, and 1664 nm | 94.44% |
iWOA/SPA | 905, 921, 944, 1014, 1046, 1097, 1277, 1347, 1365, 1427, 1451, 1506, 1520, 1545, 1556, 1607, 1619, 1645, 1670, and 1683 nm | 94.44% | |
FN | PCA | 911, 931, 946, 964, 972, 982, 987, 1006, 1009, 1021, 1034, 1040, 1056, 1063, 1497, 1510, 1520, 1554, 1571, 1581, 1593, 1595, 1603, 1605, 1611, 1615, 1623, 1627, 1635, and 1641 nm | 91.67% |
RFE/iWOA | 900, 905, 913, 926, 1051, 1185, 1356, 1393, 1400, 1410, 1423,1455, 1459, 1479, 1497, 1506, 1517, 1561, 1603, 1613, 1625, 1629, 1664, 1680, 1682, 1683, 1687, 1689, 1693, and 1694 nm | 91.67% |
Index | Model | Test | Item | Measured Value | Predicted Value |
---|---|---|---|---|---|
SV | iWOA/SPA-SOA-SVR | F-test | Average | 29.0 | 28.7 |
Variance | 42.1 | 39.0 | |||
Observed value | 50 | 50 | |||
df | 49 | 49 | |||
F | 1.0791 | ||||
P (F ≤ f) one-tailed | 0.3955 | ||||
F ‘one-tailed critical value’ | 1.6073 | ||||
t-test | Average | 29.0 | 28.7 | ||
Variance | 42.1 | 39.0 | |||
Observed value | 50 | 50 | |||
Merger of variance | 40.6 | ||||
Assumed mean difference | 0 | ||||
df | 98 | ||||
t Stat | 0.2020 | ||||
P (T ≤ t) one-tailed | 0.4202 | ||||
t ‘one-tailed critical value’ | 1.6606 | ||||
P (T ≤ t) two-tailed | 0.8404 | ||||
t ‘two-tailed critical value’ | 1.9845 | ||||
FN | RFE/iWOA-SOA-SVR | F-test | Average | 334 | 334 |
Variance | 1518 | 1363 | |||
Observed value | 50 | 50 | |||
df | 49 | 49 | |||
F | 1.1134 | ||||
P (F ≤ f) one-tailed | 0.3542 | ||||
F ‘one-tailed critical value’ | 1.6073 | ||||
t-test | Average | 334 | 334 | ||
Variance | 1518 | 1363 | |||
Observed value | 50 | 50 | |||
Merger of variance | 1440 | ||||
Assumed mean difference | 0 | ||||
df | 98 | ||||
t Stat | 0.1027 | ||||
P (T ≤ t) one-tailed | 0.4592 | ||||
t ‘one-tailed critical value’ | 1.6606 | ||||
P (T ≤ t) two-tailed | 0.9184 | ||||
t ‘two-tailed critical value’ | 1.9845 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Wang, Y.; Zhang, C.; Li, X.; Xing, L.; Lv, M.; He, H.; Pan, L.; Ou, X. Machine-Learning-Algorithm-Assisted Portable Miniaturized NIR Spectrometer for Rapid Evaluation of Wheat Flour Processing Applicability. Foods 2025, 14, 1799. https://doi.org/10.3390/foods14101799
Wang Y, Zhang C, Li X, Xing L, Lv M, He H, Pan L, Ou X. Machine-Learning-Algorithm-Assisted Portable Miniaturized NIR Spectrometer for Rapid Evaluation of Wheat Flour Processing Applicability. Foods. 2025; 14(10):1799. https://doi.org/10.3390/foods14101799
Chicago/Turabian StyleWang, Yuling, Chen Zhang, Xinhua Li, Longzhu Xing, Mengchao Lv, Hongju He, Leiqing Pan, and Xingqi Ou. 2025. "Machine-Learning-Algorithm-Assisted Portable Miniaturized NIR Spectrometer for Rapid Evaluation of Wheat Flour Processing Applicability" Foods 14, no. 10: 1799. https://doi.org/10.3390/foods14101799
APA StyleWang, Y., Zhang, C., Li, X., Xing, L., Lv, M., He, H., Pan, L., & Ou, X. (2025). Machine-Learning-Algorithm-Assisted Portable Miniaturized NIR Spectrometer for Rapid Evaluation of Wheat Flour Processing Applicability. Foods, 14(10), 1799. https://doi.org/10.3390/foods14101799