Monitoring of the Physicochemical Properties and Aflatoxin of Aspergillus flavus-Contaminated Peanut Kernels Based on Near-Infrared Spectroscopy Combined with Machine Learning
Abstract
1. Introduction
2. Materials and Methods
2.1. Materials
2.2. Sample Cultivation
2.3. HPLC Analysis of Aflatoxins
2.3.1. Standard Solution Preparation
2.3.2. Sample Preparation
2.3.3. Chromatographic Conditions
2.4. Determination of Physicochemical Properties
2.5. NIR Spectroscopy Analysis
2.6. Spectra Data Preprocessing
2.7. Characteristic Bands Selection
2.8. Correlation Analysis
2.9. Machine Learning Arithmetic
- Backpropagation Neural Network (BPNN) is a method of prediction using neural networks, which learns complex nonlinear mapping relationships between inputs and outputs by training neural networks. Its operational steps are coupled with dividing the data into training, validation, and test sets, then determining the architecture of the neural network, including the number of layers, the number of neurons per layer, and the activation function, etc., performing forward propagation and backpropagation through the training set, adjusting the weights to minimize the loss function, evaluating the performance of the model using the validation set, adjusting the parameters of the model to improve the accuracy, and finally, performing the prediction on the test set and evaluating the model’s generalization ability [24]. The parameters of the model are shown in Table S1.
- Support Vector Machine (SVM) is a powerful supervised learning algorithm that can be used for regression prediction. SVM operates by finding hyperplanes in high-dimensional feature space, effectively separating data by categories and maximizing the intervals between the categories, which in turn improves the robustness and accuracy of the classification [25]. SVM is popular and is known to be powerful in classifying and handling high-dimensional data, and the implementation of kernel functions and penalty parameters enables the algorithm to handle classification tasks that contain linear and nonlinear distinctions [26], but there are some challenges in handling large-scale data, model tuning, and interpretability. The parameters of the model are shown in Table S2.
- Random Forest (RF) is an integrated learning method that improves the predictive power and stability of a model by combining multiple decision trees. Random Forest improves prediction accuracy by constructing multiple decision trees and combining their predictions. Each tree is trained on a different subset of training data, and the predictions are determined by classification or regression [27]. Random forests are widely used for tasks such as classification, regression, feature selection, etc., and are a powerful and flexible machine learning method. The parameters of this model are shown in Table S3.
2.10. Model Evaluation
3. Results
3.1. Occurrence of AFB1 in Peanut Samples by HPLC
3.2. Physicochemical Property Changes in Peanut Samples
3.3. Analysis of Spectral Data Preprocessing Results
3.4. Correlation Analysis
3.5. Analysis of Regression Prediction Model
4. Discussion
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Zhou, M.; Wang, L.; Wu, H.; Li, Q.; Li, M.; Zhang, Z.; Zhao, Y.; Lu, Z.; Zou, Z. Machine learning modeling and prediction of peanut protein content based on spectral images and stoichiometry. LWT 2022, 169, 114015. [Google Scholar] [CrossRef]
- Mingrou, L.; Guo, S.; Ho, C.T.; Bai, N. Review on chemical compositions and biological activities of peanut (Arachis hypogeae L.). J. Food Biochem. 2022, 46, e14119. [Google Scholar] [CrossRef]
- Lu, Y.; Jia, B.; Yoon, S.-C.; Zhuang, H.; Ni, X.; Guo, B.; Gold, S.E.; Fountain, J.C.; Glenn, A.E.; Lawrence, K.C.; et al. Spatio-temporal patterns of Aspergillus flavus infection and aflatoxin B1 biosynthesis on maize kernels probed by SWIR hyperspectral imaging and synchrotron FTIR microspectroscopy. Food Chem. 2022, 382, 132340. [Google Scholar] [CrossRef]
- Nejad, B.G.; Mostafaei, Z.; Rezaabad, A.B.; Mehravar, F.; Zarei, M.; Dehghani, A.; Estabragh, M.A.R.; Karami-Mohajeri, S.; Alizadeh, H. A systematic review with meta-analysis of the relation of aflatoxin B1 to growth impairment in infants/children. BMC Pediatr. 2023, 23, 614. [Google Scholar] [CrossRef]
- Marín, S.; Aldars-García, L.; Molino, F.; Ramos, A.J.; Sanchis, V. Aflatoxin B1 production: A time–water activity–temperature model. Fungal Biol. 2024, 128, 2399–2407. [Google Scholar] [CrossRef]
- de Sá, S.V.M.; Faria, M.A.; Fernandes, J.O.; Cunha, S.C. Investigating the individual and mixture cytotoxicity of co-occurring aflatoxin B1, enniatin B, and sterigmatocystin on gastric, intestinal, hepatic, and renal cellular models. Food Chem. Toxicol. 2024, 188, 114640. [Google Scholar] [CrossRef]
- Zheng, C.; Qu, Z.; Hou, J.; Yao, Y. Contamination and Control of Mycotoxins in Grain and Oil Crops. Microorganisms 2024, 12, 567. [Google Scholar] [CrossRef]
- Liu, S.; Jiang, S.; Yao, Z.; Liu, M. Aflatoxin detection technologies: Recent advances and future prospects. Environ. Sci. Pollut. Res. 2023, 30, 79627–79653. [Google Scholar] [CrossRef]
- Sabo, D.E.; Pitts, J.J.; Kemenova, O.; Heist, C.A.; Joffe, B.; Song, X.; Hammond, W.M. Utilizing plant-based biogenic volatile organic compounds (bVOCs) to detect aflatoxin in peanut plants, pods, and kernels. J. Agric. Food Res. 2024, 18, 101285. [Google Scholar] [CrossRef]
- Aliakbarzadeh, G.; Mahmoudi-Meymand, M.; Mazaheri, M. Verification of a standard method based on immunoaffinity column cleanup and HPLC-FLD analysis for determination of aflatoxins in peanut kernels. Food Control 2023, 152, 109820. [Google Scholar] [CrossRef]
- Yoshinari, T.; Sugita-Konishi, Y.; Sato, E.; Takeuchi, H.; Taniguchi, M.; Fukumitsu, T.; Shimoyama, A.; Nakamura, A.; Murayama, S.; Owaki, S.; et al. Survey and risk assessment of aflatoxins and sterigmatocystin in Japanese staple food items and the evaluation of an in-house ELISA technique for rapid screening. Food Control 2024, 157, 110154. [Google Scholar] [CrossRef]
- Wei, X.; Xu, N.; Wu, D.; He, Y. Determination of Branched-Amino Acid Content in Fermented Cordyceps sinensis Mycelium by Using FT-NIR Spectroscopy Technique. Food Bioprocess Technol. 2013, 7, 184–190. [Google Scholar] [CrossRef]
- Bailly, S.; Orlando, B.; Brustel, J.; Bailly, J.-D.; Levasseur-Garcia, C. Rapid Detection of Aflatoxins in Ground Maize Using Near Infrared Spectroscopy. Toxins 2024, 16, 385. [Google Scholar] [CrossRef]
- Li, J.; Deng, J.; Bai, X.; da Graca Nseledge Monteiro, D.; Jiang, H. Quantitative analysis of aflatoxin B1 of peanut by optimized support vector machine models based on near-infrared spectral features. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 2023, 303, 123208. [Google Scholar] [CrossRef]
- Caramês, E.T.d.S.; Piacentini, K.C.; Aparecida Almeida, N.; Lopes Pereira, V.; Azevedo Lima Pallone, J.; de Oliveira Rocha, L. Rapid assessment of enniatins in barley grains using near infrared spectroscopy and chemometric tools. Food Res. Int. 2022, 161, 111759. [Google Scholar] [CrossRef]
- GB/T 5009.6-2016; Determination of Fat in Foods. Standards Press of China: Beijing, China, 2016.
- GB/T 5510-2011; Inspection of Grain and Oils-Determination of Fat Acidity Value of Grain and Oilseeds. Standards Press of IChina: Beijing, China, 2011.
- GB/T 5009.5-2016; Determination of Protein in Foods. Standards Press of China: Beijing, China, 2016.
- GB/T 5009.3-2016; Determination of Moisture in Foods. Standards Press of China: Beijing, China, 2016.
- Zhou, X.; Yang, J.; Su, Y.; He, K.; Fang, Y.; Sun, X.; Ju, Y.; Liu, W. Aggregation and assessment of grape quality parameters with visible-near-infrared spectroscopy: Introducing a novel quantitative index. Postharvest Biol. Technol. 2024, 218, 113131. [Google Scholar] [CrossRef]
- Chen, H.; Pan, T.; Chen, J.; Lu, Q. Waveband selection for NIR spectroscopy analysis of soil organic matter based on SG smoothing and MWPLS methods. Chemom. Intell. Lab. Syst. 2011, 107, 139–146. [Google Scholar] [CrossRef]
- Li, H.; Liang, Y.; Xu, Q.; Cao, D. Key wavelengths screening using competitive adaptive reweighted sampling method for multivariate calibration. Anal. Chim. Acta 2009, 648, 77–84. [Google Scholar] [CrossRef]
- Han, Q.-L.; Lu, J.-F.; Zhu, J.-J.; Lin, L.; Zheng, Z.; Jiang, S.-T. Non-destructive detection of freshness in crayfish (Procambarus clarkii) based on near-infrared spectroscopy combined with deep learning. Food Control 2025, 168, 110858. [Google Scholar] [CrossRef]
- Yu, Y.; Chai, Y.; Li, Z.; Li, Z.; Ren, Z.; Dong, H.; Chen, L. Quantitative predictions of protein and total flavonoids content in Tartary and common buckwheat using near-infrared spectroscopy and chemometrics. Food Chem. 2025, 462, 141033. [Google Scholar] [CrossRef] [PubMed]
- Li, Q.; Lei, T.; Cheng, Y.; Wei, X.; Sun, D.-W. Predicting wheat gluten concentrations in potato starch using GPR and SVM models built by terahertz time-domain spectroscopy. Food Chem. 2024, 432, 137235. [Google Scholar] [CrossRef]
- Cruz-Tirado, J.P.; Lima Brasil, Y.; Freitas Lima, A.; Alva Pretel, H.; Teixeira Godoy, H.; Barbin, D.; Siche, R. Rapid and non-destructive cinnamon authentication by NIR-hyperspectral imaging and classification chemometrics tools. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 2023, 289, 122226. [Google Scholar] [CrossRef]
- da Silva Pereira, E.; Cruz-Tirado, J.P.; Lourenço Crippa, B.; Martins Morasi, R.; Milagres de Almeida, J.; Fernandes Barbin, D.; Barbon, S., Jr.; Cristina Cirone Silva, N. Portable near infrared (NIR) spectrometer coupled with machine learning to classify milk with subclinical mastitis. Food Control 2024, 163, 110527. [Google Scholar] [CrossRef]
- Guo, Z.; Zhang, J.; Dong, H.; Sun, J.; Huang, J.; Li, S.; Ma, C.; Guo, Y.; Sun, X. Spatio-temporal distribution patterns and quantitative detection of aflatoxin B1 and total aflatoxin in peanut kernels explored by short-wave infrared hyperspectral imaging. Food Chem. 2023, 424, 136441. [Google Scholar] [CrossRef]
- Xu, T.-T.; Li, J.; Fan, Y.-W.; Zheng, T.-W.; Deng, Z.-Y. Comparison of Oxidative Stability among Edible Oils under Continuous Frying Conditions. Int. J. Food Prop. 2014, 18, 1478–1490. [Google Scholar] [CrossRef]
- Sharma, S.; Choudhary, B.; Yadav, S.; Mishra, A.; Mishra, V.K.; Chand, R.; Chen, C.; Pandey, S.P. Metabolite profiling identified pipecolic acid as an important component of peanut seed resistance against Aspergillus flavus infection. J. Hazard. Mater. 2021, 404, 124155. [Google Scholar] [CrossRef]
- Xiang, F.; Qin, J.; Ding, C.; Ma, X.; Gu, F.; Jiang, Y.; Abubakar, B.Z.; Hu, H.; Adhikari, B.; Shi, H.; et al. Application of foodomics technologies in the study of peanut quality: A review. Trends Food Sci. Technol. 2025, 155, 104793. [Google Scholar] [CrossRef]
- Wu, J.; Zareef, M.; Chen, Q.; Ouyang, Q. Application of visible-near infrared spectroscopy in tandem with multivariate analysis for the rapid evaluation of matcha physicochemical indicators. Food Chem. 2023, 421, 136185. [Google Scholar] [CrossRef]
- Tang, N.; Sun, J.; Yao, K.; Zhou, X.; Tian, Y.; Cao, Y.; Nirere, A. Identification of Lycium barbarum varieties based on hyperspectral imaging technique and competitive adaptive reweighted sampling-whale optimization algorithm-support vector machine. J. Food Process Eng. 2020, 44, e13603. [Google Scholar] [CrossRef]
- Lee, K.-M.; Davis, J.; Herrman, T.J.; Murray, S.C.; Deng, Y. An empirical evaluation of three vibrational spectroscopic methods for detection of aflatoxins in maize. Food Chem. 2015, 173, 629–639. [Google Scholar] [CrossRef]
- Wu, Q.; Oliveira, M.M.; Achata, E.M.; Kamruzzaman, M. Reagent-free detection of multiple allergens in gluten-free flour using NIR spectroscopy and multivariate analysis. J. Food Compos. Anal. 2023, 120, 105324. [Google Scholar] [CrossRef]
- Ong, P.; Tung, I.; Chiu, C.; Tsai, I.; Shih, H.; Chen, S.; Chuang, Y. Determination of aflatoxin B1 level in rice (Oryza sativa L.) through near-infrared spectroscopy and an improved simulated annealing variable selection method. Food Control 2022, 136, 108886. [Google Scholar] [CrossRef]
- Nie, C.; Jiang, J.; Liu, Z.; Yuan, D.; Li, K.; Li, M. Detecting moldy peanuts via moldiness index and kernel features by hyperspectral imaging. J. Food Meas. Charact. 2023, 18, 1857–1877. [Google Scholar] [CrossRef]
- Chen, G.; Xiao, W.; Lin, Z.; Xia, M.; Xue, Y.; Zhang, J.; Bao, S.; Zhu, J.; Xie, H.; Huang, J.; et al. Unraveling the mysterious jujube-like aroma in Pu-erh tea: Decoding the material basis for distinctive aroma formation. Food Res. Int. 2025, 214, 116620. [Google Scholar] [CrossRef]
- Deng, J.; Jiang, H.; Chen, Q. Characteristic wavelengths optimization improved the predictive performance of near-infrared spectroscopy models for determination of aflatoxin B1 in maize. J. Cereal Sci. 2022, 105, 103474. [Google Scholar] [CrossRef]
Prediction Models | Preprocessing | Calibration Set | Prediction Set | LOOCV | |||||
---|---|---|---|---|---|---|---|---|---|
R2C | RMSEC | RPDC | R2P | RMSEP | RPDP | R2 | RMSE | ||
BPNN | Orig. spec | 0.4554 | 96.49 | 1.49 | 0.1218 | 91.96 | 1.11 | 0.2451 | 93.16 |
MSC | 0.9176 | 37.85 | 3.82 | 0.3971 | 73.60 | 1.39 | 0.7523 | 55.35 | |
SNV | 0.9589 | 28.50 | 5.08 | 0.5616 | 29.16 | 3.51 | 0.8143 | 28.73 | |
SG | 0.6059 | 140.51 | 1.03 | 0.1664 | 357.96 | 0.29 | 0.4317 | 214.62 | |
SVM | Orig. spec | 0.3808 | 106.06 | 1.36 | 0.6050 | 50.66 | 2.02 | 0.5872 | 64.28 |
MSC | 0.9516 | 29.66 | 4.88 | 0.6740 | 49.10 | 2.08 | 0.8456 | 34.58 | |
SNV | 0.9945 | 9.92 | 14.59 | 0.9528 | 19.58 | 7.01 | 0.9834 | 11.20 | |
SG | 0.2185 | 298.15 | 0.49 | 0.3307 | 73.71 | 1.39 | 0.2562 | 102.34 | |
RF | Orig. spec | 0.4296 | 98.05 | 1.48 | 0.4144 | 50.66 | 2.02 | 0.4157 | 61.35 |
MSC | 0.5616 | 90.18 | 1.60 | 0.7097 | 41.83 | 2.44 | 0.7011 | 46.57 | |
SNV | 0.5797 | 88.81 | 1.63 | 0.7446 | 37.91 | 2.70 | 0.6781 | 47.37 | |
SG | 0.3920 | 211.38 | 0.68 | 0.2378 | 279.07 | 0.37 | 0.3914 | 223.45 |
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.; Li, M.; Xu, L.; Gao, C.; Wang, C.; Xu, L.; Jiang, S.; Cao, L.; Pang, M. Monitoring of the Physicochemical Properties and Aflatoxin of Aspergillus flavus-Contaminated Peanut Kernels Based on Near-Infrared Spectroscopy Combined with Machine Learning. Foods 2025, 14, 2186. https://doi.org/10.3390/foods14132186
Wang Y, Li M, Xu L, Gao C, Wang C, Xu L, Jiang S, Cao L, Pang M. Monitoring of the Physicochemical Properties and Aflatoxin of Aspergillus flavus-Contaminated Peanut Kernels Based on Near-Infrared Spectroscopy Combined with Machine Learning. Foods. 2025; 14(13):2186. https://doi.org/10.3390/foods14132186
Chicago/Turabian StyleWang, Yingge, Mengke Li, Li Xu, Chun Gao, Cheng Wang, Lu Xu, Shaotong Jiang, Lili Cao, and Min Pang. 2025. "Monitoring of the Physicochemical Properties and Aflatoxin of Aspergillus flavus-Contaminated Peanut Kernels Based on Near-Infrared Spectroscopy Combined with Machine Learning" Foods 14, no. 13: 2186. https://doi.org/10.3390/foods14132186
APA StyleWang, Y., Li, M., Xu, L., Gao, C., Wang, C., Xu, L., Jiang, S., Cao, L., & Pang, M. (2025). Monitoring of the Physicochemical Properties and Aflatoxin of Aspergillus flavus-Contaminated Peanut Kernels Based on Near-Infrared Spectroscopy Combined with Machine Learning. Foods, 14(13), 2186. https://doi.org/10.3390/foods14132186