Abstract
Chocolate-coated confectionery, including fruits and nuts, is an increasingly popular snack food. Non-destructive discrimination of the core composition could be useful for quality assurance purposes, such as ensuring the absence of peanuts in a batch of chocolate-coated sultanas. This study investigated the optimum pre-processing methods and discrimination algorithms for identifying chocolate-coated peanuts and sultanas from their near-infrared (NIR) spectra. The best-performing results were found using partial least squares discriminant analysis (PLS-DA) and principal component analysis with linear discriminant analysis (PCA-LDA), which both demonstrated 100% classification accuracy when applied to the validation set. Principal component analysis with support vector machine (PCA-SVM) showed slightly poorer results, particularly when using non-optimal pre-processing techniques. In general, the most accurate results were found when using either the unprocessed or SNV-processed spectral data. This work supports the prospect of using near-infrared spectroscopy for the quality assurance in the manufacture or wholesale of panned chocolate goods.
Similar content being viewed by others
Data availability
The data supporting the results of this manuscript are available from the authors upon request.
References
Statista. Size of the chocolate confectionery market worldwide from 2016 to 2026. Available online: https://www.statista.com/forecasts/983554/global-chocolate-confectionery-market-size Accessed on 29 Aug.
Kiss M, Czine P, Balogh P, Szakály Z (2022) The connection between manufacturer and private label brands and brand loyalty in chocolate bar buying decisions–A hybrid choice approach. Appetite 177:106145. https://doi.org/10.1016/j.appet.2022.106145
Depypere F, Delbaere C, De Clercq N, Dewettinck K (2009) Fat bloom and cracking of filled chocolates: issues for the European manufacturer? New Food 12:9–12
Hartel RW, von Elbe JH, Hofberger R (2018) Chocolate Panning. In Confectionery Science and Technology. Springer International Publishing, Cham
Gutiérrez TJ (2017) State-of-the-art chocolate manufacture: a review. Comprehen Rev Food Sci Food Safety 16:1313–1344. https://doi.org/10.1111/1541-4337.12301
Aebi M (2017) Chocolate panning. In: Aebi M (ed) Beckett’s Industrial Chocolate Manufacture and Use. John Wiley and Sons Chichester, UK
Geschwindner G, Drouven H (2009) 18 Manufacturing processes: chocolate panning and inclusions. In: Talbot G (ed) Science and Technology of Enrobed and Filled Chocolate, Confectionery and Bakery Products. Woodhead Publishing, Elsevier
Leroux H, Langlois A, Paradis L, Des Roches A, Bégin P (2020) Visual assessment does not reliably predict peanut content in chocolate-covered peanut candies used for oral immunotherapy. J Allergy Clin Immunol 8:368–370. https://doi.org/10.1016/j.jaip.2019.08.046
Jördens C, Koch M (2008) Detection of foreign bodies in chocolate with pulsed terahertz spectroscopy. Optical Eng 47:037003
Agour M, Falldorf C, Taleb F, Koch M, Bergmann RB, Castro-Camus E (2022) Chocolate inspection by means of phase-contrast imaging using multiple-plane terahertz phase retrieval. Opt Lett 47:3283–3286. https://doi.org/10.1364/OL.464102
Johnson JB, Walsh KB, Naiker M, Ameer K (2023) The use of infrared spectroscopy for the quantification of bioactive compounds in food: a review. Molecules 28:3215. https://doi.org/10.3390/molecules28073215
Amorim TL, Duarte LM, de Oliveira MAL, de la Fuente MA, Gómez-Cortés P (2020) Prediction of fatty acids in chocolates with an emphasis on c18:1 trans fatty acid positional isomers using ATR-FTIR associated with multivariate calibration. J Agric Food Chem 68:10893–10901. https://doi.org/10.1021/acs.jafc.0c04316
da Costa Filho PA (2009) Rapid determination of sucrose in chocolate mass using near infrared spectroscopy. Anal Chim Acta 631:206–211. https://doi.org/10.1016/j.aca.2008.10.049
Gatti RF, de Santana FB, Poppi RJ, Ferreira DS (2021) Portable NIR spectrometer for quick identification of fat bloom in chocolates. Food Chem 342:128267. https://doi.org/10.1016/j.foodchem.2020.128267
Bin, Z.; Lei, D.; Qiao, G.; Xinyu, W.; Yangsheng, X. 2008 Fast discrimination of chocolate varieties using near infrared spectroscopy. In Proceedings of the 2008 IEEE International Conference on Automation and Logistics, 2008: 730–735.
Johnson JB (2022) Discrimination of centre composition in panned chocolate goods using near infrared spectroscopy. J Near Infrared Spectrosc 30:130–137. https://doi.org/10.1177/09670335221085616
Huang M, Kim MS, Chao K, Qin J, Mo C, Esquerre C, Delwiche S, Zhu Q (2016) Penetration depth measurement of near-infrared hyperspectral imaging light for milk powder. Sensors 16:441. https://doi.org/10.3390/s16040441
Xu L, Li J, Zhang D (2018) Near-infrared light penetration depth analysis inside melon with thick peel by a novel strategy of slicing combining with least square fitting method. J Food Proc Eng. 41:e12886. https://doi.org/10.1111/jfpe.12886
Bro R, Smilde AK (2014) Principal component analysis. Anal Meth 6:2812–2831. https://doi.org/10.1039/C3AY41907J
El Orche A, Mamad A, Elhamdaoui O, Cheikh A, El Karbane M, Bouatia M (2021) Comparison of machine learning classification methods for determining the geographical origin of raw milk using vibrational spectroscopy. J Spectrosc 2021:5845422. https://doi.org/10.1155/2021/5845422
Li Z, Wang P-P, Huang C-C, Shang H, Pan S-Y, Li X-J (2014) Application of Vis/NIR spectroscopy for chinese liquor discrimination. Food Anal Methods 7:1337–1344. https://doi.org/10.1007/s12161-013-9755-9
Johnson JB, El Orche A, Naiker M (2022) Prediction of anthocyanin content and variety in plum extracts using ATR-FTIR spectroscopy and chemometrics. Vibrat Spect 121:103406. https://doi.org/10.1016/j.vibspec.2022.103406
Brereton RG, Lloyd GR (2016) Re-evaluating the role of the mahalanobis distance measure. J Chemom 30:134–143. https://doi.org/10.1002/cem.2779
El Orche A, Bouatia M, Mbarki M (2020) Rapid analytical method to characterize the freshness of olive oils using fluorescence spectroscopy and chemometric algorithms. J Anal Meth Chem 2020:8860161. https://doi.org/10.1155/2020/8860161
Subasi A (2020) Chapter 3 machine learning techniques practical machine learning for data analysis using python. In: Subasi A (ed) Academic Press. Machine learning techniques, USA
Tremblay M, Kammer M, Lange H, Plattner S, Baumgartner C, Stegeman JA, Duda J, Mansfeld R, Döpfer D (2019) Prediction model optimization using full model selection with regression trees demonstrated with FTIR data from bovine milk. Prev Vet Med 163:14–23. https://doi.org/10.1016/j.prevetmed.2018.12.012
Feng L, Wu B, Zhu S, Wang J, Su Z, Liu F, He Y, Zhang C (2020) Investigation on data fusion of multisource spectral data for rice leaf diseases identification using machine learning methods. Front Plant Sci. https://doi.org/10.3389/fpls.2020.577063
Zeaiter M, Rutledge D (2009) 304 Preprocessing Methods. In: Walczak B (ed) Comprehensive chemometrics. Elsevier, Oxford. USA
Luo J, Ying K, He P, Bai J (2005) Properties of Savitzky-Golay digital differentiators. Digital Signal Proc 15:122–136. https://doi.org/10.1016/j.dsp.2004.09.008
Sun X, Subedi P, Walker R, Walsh KB (2020) NIRS prediction of dry matter content of single olive fruit with consideration of variable sorting for normalisation pre-treatment. Posth Biol Technol 163:111140. https://doi.org/10.1016/j.postharvbio.2020.111140
Tao F, Yao H, Hruska Z, Liu Y, Rajasekaran K, Bhatnagar D (2019) Use of visible–near-infrared (Vis-NIR) spectroscopy to detect aflatoxin B1 on peanut kernels. Appl Spectrosc 73:415–423. https://doi.org/10.1177/0003702819829725
Huxsoll CC (2000) Assessment of near infrared (NIR) diffuse reflectance analysis for measuring moisture and water activity in raisins. J Food Process Preserv 24:315–333. https://doi.org/10.1111/j.1745-4549.2000.tb00422.x
Rahman A, Wang S, Yan J, Xu H (2021) Intact macadamia nut quality assessment using near-infrared spectroscopy and multivariate analysis. J Food Comp Anal 102:104033
Carvalho LCDV, Lima PFM (2019) Assessment of macadamia kernel quality defects by means of near infrared spectroscopy (NIRS) and nuclear magnetic resonance (NMR). Food Control 106:106695. https://doi.org/10.1016/j.foodcont.2019.06.021
Funding
This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.
Author information
Authors and Affiliations
Contributions
Conceptualization: AEO and JBJ. Methodology: AEO. Software: AEO. Validation: AEO and JBJ. Formal analysis: AEO and JBJ. Investigation: AEO and JBJ. Resources: JBJ. Data curation: JBJ. Writing—original draft preparation: AEO. Writing—review and editing: JBJ. Visualization: AEO. Supervision: JBJ. Project administration: AEO and JBJ. All authors have read and agreed to the published version of the manuscript.
Corresponding author
Ethics declarations
Conflict of interest
The authors declare no conflict of interest.
Compliance with ethics requirements
This study does not contain any studies with human participants or animals performed by any of the authors.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
El Orche, A., Johnson, J.B. Investigation of pre-processing NIR spectroscopic data and classification algorithms for the fast identification of chocolate-coated peanuts and sultanas. Eur Food Res Technol 249, 2287–2297 (2023). https://doi.org/10.1007/s00217-023-04300-2
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00217-023-04300-2