Czech J. Food Sci., 2026, 44(5):424-440 | DOI: 10.17221/58/2026-CJFS
SW-NIR spectroscopy and PLSR for predicting cocoa nibs quality across processing stagesOriginal Paper
- 1 Department of Agricultural and Biosystems Engineering, Faculty of Agricultural Technology, Universitas Gadjah Mada, Yogyakarta, Indonesia
- 2 Department of Agricultural Engineering, Faculty of Agriculture, Universitas Jenderal, Purwokerto, Indonesia
- 3 Department of Physics, Faculty of Mathematics and Natural Sciences, Universitas Gadjah Mada, Yogyakarta, Indonesia
Cocoa beans quality parameters are among other things biochemical properties such as moisture content, reducing sugars, fat, protein and total phenolic content (TPC) changed during postharvest processes. Current analytical approaches to these parameters are usually not only destructive and time-consuming but also laboratory-based analyses. This study aimed at assessing the potential of short-wave near infrared (SW-NIR) spectroscopy (954–1 700 nm) combined with partial least squares regression (PLSR) for the prediction of these quality parameters in both fresh, fermented, dried and roasted Forastero cocoa nibs. In total, a portable Flame-NIR+ spectrometer analysed 400 samples. Before developing the model, we have compared several spectral preprocessing methods like Savitzky–Golay derivatives, multiple scatter correction (MSC), standard normal variate (SNV), and normalisation. The spectra exhibited various absorption features linked to O-H, C-H, and N-H links reflective of evolving compositions across proximate processing stages. The prediction coefficients (R2P) obtained for moisture content (0.984), reducing sugars (0.958), protein (0.992), and total phenolic content (0.954) of the cocoa nibs was good, while fat prediction showed lower predictive performance than the other evaluated parameters. Savitzky-Golay derivative preprocessing consistently improved the performance of models across all evaluated parameters. These results show that SW-NIR spectroscopy with PLSR can be applied for fast, non-destructive and simultaneous estimations of multiple quality attributes in cocoa nibs during different stages of postharvest processing.
Keywords: biochemical composition; chemometrics; model interpretation; non-destructive analysis; spectral preprocessing
Received: April 6, 2026; Revised: August 23, 2026; Accepted: August 25, 2026; Prepublished online: October 23, 2026; Published: October 30, 2026 Show citation
| ACS | AIP | APA | ASA | Harvard | Chicago | Chicago Notes | IEEE | ISO690 | MLA | NLM | Turabian | Vancouver |
References
- Ackah E., Dompey E. (2021): Effects of fermentation and drying durations on the quality of cocoa (Theobroma cacao L.) beans during the rainy season in the Juaboso District of the Western-North Region, Ghana. Bulletin of the National Research Centre, 45: 175.
Go to original source... - Afoakwa E.O., Paterson A., Fowler M. (2007): Factors influencing rheological and textural qualities in chocolate - A review. Trends in Food Science & Technology, 18: 290-298.
Go to original source... - Agussabti, Rahmaddiansyah, Satriyo P., Munawar A.A. (2020): Data analysis on near infrared spectroscopy as a part of technology adoption for cocoa farmer in Aceh Province, Indonesia. Data in Brief, 29: 105251.
Go to original source... - Alean J., Chejne F., Ramírez S., Rincón E., Alzate-Arbelaez A.F., Rojano B. (2022): Proposal of a method to evaluate the in-situ oxidation of polyphenolic during the cocoa drying. Drying Technology, 40: 559-570.
Go to original source... - Alonso M.J., Wolf S., Jørgensen R.B., Madsen H., Mathisen H.M. (2022): A methodology for the selection of pollutants for ensuring good indoor air quality using the de-trended cross-correlation function. Building and Environment, 209: 108668.
Go to original source... - Andi Pallawa N.B., Salengke, Pirman (2023): Effects of roasting process on the precursor components for Maillard reaction in fermented cocoa beans. In: Mubarak H., Ramli A.R., Muhpidah, Arifin A.S., Hardinasinta G., Rizal M., Rais A., Hatmus A.S.R., Rahmatika N.D., Anshari M.A., Hidayat S.H., Yolanda D.S., Ainani A.F., Kamaruddin I., Kasmira (eds): Proceedings of the 1st Unhas International Conference on Agricultural Technology (UICAT 2021), Makassar, Indonesia, Oct 27-28, 2021: 020002.
Go to original source... - Anyidoho E.K., Teye E., Agbemafle R. (2021): Differentiation of organic cocoa beans and conventional ones by using handheld NIR spectroscopy and multivariate classification techniques. International Journal of Food Science, 2021: 1844675.
Go to original source...
Go to PubMed... - Balcázar-Zumaeta C.R., Fernández-Romero E., Santos Lopes A., Ferreira N.R., Chagas-Júnior G.C.A., Yoplac I., López-Trigoso H.A., Tuesta-Occ M.L., Maldonado-Ramirez I., Maicelo-Quintana J.L., Cayo-Colca I.S., Castro-Alayo E.M. (2024): Amino acid profile behavior during the fermentation of Criollo cocoa beans. Food Chemistry: X, 22: 101486.
Go to original source...
Go to PubMed... - Batista A.S., de Freitas Oliveira T., de Oliveira Pereira I., Santos L.S. (2021): Identification of cocoa bean quality by near infrared spectroscopy and multivariate modeling. Research, Society and Development, 10: e64101522732.
Go to original source... - Brosnan T., Sun D.W. (2004): Improving quality inspection of food products by computer vision - A review. Journal of Food Engineering, 61: 3-16.
Go to original source... - Calvo A.M., Botina B.L., García M.C., Cardona W.A., Montenegro A.C., Criollo J. (2021): Dynamics of cocoa fermentation and its effect on quality. Scientific Reports, 11: 16746.
Go to original source...
Go to PubMed... - Castillejos-Mijangos L.A., Meza-Márquez O.G., Osorio-Revilla G., Jiménez-Martínez C., Gallardo-Velázquez T. (2023): Identification of variety and prediction of chemical composition in cocoa beans (Theobroma cacao L.) by FT-MIR spectroscopy and chemometrics. Foods, 12: 4144.
Go to original source...
Go to PubMed... - das Virgens I.A., Pires T.C., de Santana L.R.R., Soares S.E., Maciel L.F., Ferreira A.C.R., Biasoto A.C.T., Bispo E.S. (2021): Relationship between bioactive compounds and sensory properties of dark chocolate produced from Brazilian hybrid cocoa. International Journal of Food Science & Technology, 56: 1905-1917.
Go to original source... - Devi N., Cruz-Martins N., Malik T., Kumar V., Islam M.T., Verma R., Singh G.P., Kumar D. (2025): Phytochemical profiling and anti-bacterial activity of Red Delicious apple pomace with integrated hydrolysis to obtain fermentable sugars: A biorefinery approach. Food Science & Nutrition, 13: e70543.
Go to original source...
Go to PubMed... - Fodor M., Matkovits A., Benes E.L., Jókai Z. (2024): The role of near-infrared spectroscopy in food quality assurance: A review of the past two decades. Foods, 13: 3501.
Go to original source... - Forte M., Currò S., Van de Walle D., Dewettinck K., Mirisola M., Fasolato L., Carletti P. (2023): Quality evaluation of fair-trade cocoa beans from different origins using portable near-infrared spectroscopy (NIRS). Foods, 12: 4.
Go to original source...
Go to PubMed... - Hashimoto J.C., Lima J.C., Celeghini R.M.S., Nogueira A.B., Efraim P., Poppi R.J., Pallone J.A.L. (2018): Quality control of commercial cocoa beans (Theobroma cacao L.) by near-infrared spectroscopy. Food Analytical Methods, 11: 1510-1517.
Go to original source... - Hayati R., Zulfahrizal, Munawar A.A. (2021): Robust prediction performance of inner quality attributes in intact cocoa beans using near infrared spectroscopy and multivariate analysis. Heliyon, 7: e06286.
Go to original source... - Hernández-Hernández C., Fernández-Cabanás V.M., Rodríguez-Gutiérrez G., Fernández-Prior Á., Morales-Sillero A. (2022): Rapid screening of unground cocoa beans based on their content of bioactive compounds by NIR spectroscopy. Food Control, 131: 108347.
Go to original source... - Herrera-Rocha F., Cala M.P., León-Inga A.M., Aguirre Mejía J.L., Rodríguez-López C.M., Florez S.L., Chica M.J., Olarte H.H., Duitama J., González Barrios A.F., Fernández-Niño M. (2022): Lipidomic profiling of bioactive lipids during spontaneous fermentations of fine-flavor cocoa. Food Chemistry, 397: 133845.
Go to original source...
Go to PubMed... - Jiang H., Zhou Y., Zhang C., Yuan W., Zhou H. (2023): Evaluation of dual-band near-infrared spectroscopy and chemometric analysis for rapid quantification of multi-quality parameters of soy sauce stewed meat. Foods, 12: 2882.
Go to original source...
Go to PubMed... - Jiménez-Rodríguez D.J., García-Alamilla P., Márquez-Rocha F.J., Vázquez-Medina R., Carrera-Lanestosa A., González-Alejo F.A., Sánchez-Ramos C.A., Ruiz-Santiago F.L. (2024): Temperature effect of cocoa (Theobroma cacao L.) drying on energy consumption, bioactive composition and vibrational changes. Processes, 12: 2523.
Go to original source... - Kandpal L.M., Lohumi S., Kim M.S., Kang J.S., Cho B.K. (2016): Near-infrared hyperspectral imaging system coupled with multivariate methods to predict viability and vigor in muskmelon seeds. Sensors and Actuators B: Chemical, 229: 534-544.
Go to original source... - Krähmer A., Engel A., Kadow D., Ali N., Umaharan P., Kroh L.W., Schulz H. (2015): Fast and neat - Determination of biochemical quality parameters in cocoa using near infrared spectroscopy. Food Chemistry, 181: 152-159.
Go to original source...
Go to PubMed... - La Mantia A., Ianni F., Schoubben A., Cespi M., Lisjak K., Guarnaccia D., Sardella R., Blasi P. (2023): Effect of cocoa roasting on chocolate polyphenols evolution. Antioxidants, 12: 469.
Go to original source...
Go to PubMed... - Li J. (2016): Assessing spatial predictive models in the environmental sciences: Accuracy measures, data variation and variance explained. Environmental Modelling & Software, 80: 1-8.
Go to original source... - López-Calabozo R., Liberal Â., Fernandes Â., Revilla I., Ferreira I.C.F.R., Barros L., Vivar-Quintana A.M. (2024): Determination of carbohydrate composition in lentils using near-infrared spectroscopy. Sensors, 24: 4232.
Go to original source... - Mahesh S., Jayas D.S., Paliwal J., White N.D.G. (2015): Comparison of partial least squares regression (PLSR) and principal components regression (PCR) methods for protein and hardness predictions using near-infrared (NIR) hyperspectral images of bulk samples of Canadian wheat. Food and Bioprocess Technology, 8: 31-40.
Go to original source... - Maldonado Y.E., Figueroa J.G. (2023): Microwave-assisted extraction optimization and effect of drying temperature on catechins, procyanidins and theobromine in cocoa beans. Molecules, 28: 3755.
Go to original source... - Manley M. (2014): Near-infrared spectroscopy and hyperspectral imaging: Non-destructive analysis of biological materials. Chemical Society Reviews, 43: 8200-8214.
Go to original source...
Go to PubMed... - Masithoh R.E., Pahlawan M.F.R., Arifani E.N., Amanah H.Z., Cho B.K. (2024): Determination of the betacyanin and betaxanthin contents of red beet (Beta vulgaris) powder using partial least square regression based on visible-near infrared spectra. Trends in Sciences, 21: 7639.
Go to original source... - Moreno-Trujillo T.R., Perez E., Verardo V., García-Villanova B., Guerra-Hernández E.J. (2024): Impact of technological processes on the formation of furosine, acrylamide and furan in traditional Venezuelan cocoa. Foods, 13: 829.
Go to original source...
Go to PubMed... - Moussoyi Moundanga S., Petit J., Ndangui C.B., Scher J., Nzikou J.-M. (2024): Impact of cocoa variety on merchant quality and physicochemical characteristics of raw cocoa beans and roasted cocoa mass. Discover Food, 4: 115.
Go to original source... - Nadimi M., Paliwal J. (2024): Recent applications of near-infrared spectroscopy in food quality analysis. Foods, 13: 2633.
Go to original source...
Go to PubMed... - Pahlawan M.F.R., Murti B.M.A., Masithoh R.E. (2022): The potency of Vis/NIR spectroscopy for classification of soybean based of colour. IOP Conference Series: Earth and Environmental Science, 1018: 012015.
Go to original source... - Peña-Correa R.F., Ataç Mogol B., Fryganas C., Fogliano V. (2023): Fluidized-bed-roasted cocoa has different chemical characteristics than conventionally roasted cocoa. Journal of Agricultural and Food Chemistry, 71: 10203-10211.
Go to original source...
Go to PubMed... - Peña-Correa R.F., Ataç Mogol B., Fogliano V. (2024): The impact of roasting on cocoa quality parameters. Critical Reviews in Food Science and Nutrition, 64: 4348-4361.
Go to original source... - Perez M., Lopez-Yerena A., Vallverdú-Queralt A. (2022): Traceability, authenticity and sustainability of cocoa and chocolate products: A challenge for the chocolate industry. Critical Reviews in Food Science and Nutrition, 62: 475-489.
Go to original source...
Go to PubMed... - Ramón V., Hernández H.E., Polania P., Suárez J.C. (2023): Spatial distribution of cocoa quality: Relationship between physicochemical, functional and sensory attributes of clones from southern Colombia. Agronomy, 13: 15.
Go to original source... - Reggente M., Dillner A.M., Takahama S. (2019): Analysis of functional groups in atmospheric aerosols by infrared spectroscopy: Systematic intercomparison of calibration methods for US measurement network samples. Atmospheric Measurement Techniques, 12: 2287-2312.
Go to original source... - de Souza M.S.d.S., Borges L.L.R., de Barros Kobi H., Freitas V.V., Rigolon T.C.B., Olegário L.S., Gutiérrez E.A., Felix P.H.C., Vidigal M.C.T.R., Stringheta P.C. (2024): Roasted and unroasted cocoa nibs: Bioactive compounds analysis and application in cereal bars. Foods, 13: 3510.
Go to original source...
Go to PubMed... - Teye E. (2022): Mini shortwave spectroscopic techniques and multivariate statistical analysis as a tool for testing intact cocoa beans at farmgate for quality control in Ghana. Infrared Physics & Technology, 122: 104092.
Go to original source... - Thukral A.K., Bhardwaj R., Kumar V., Sharma A. (2019): New indices regarding the dominance and diversity of communities, derived from sample variance and standard deviation. Heliyon, 5: e02606.
Go to original source...
Go to PubMed... - van Rooyen J., Marini F., Orth S.H., Oyeyinka S.A., Simsek S., Manley M. (2023): Effect of wheat roasting conditions and wheat type on short-wave infrared (SWIR) spectral data of whole and milled wheat by ANOVA-simultaneous component analysis. Spectrochimica Acta Part A: Molecular and Biomolecular Spectroscopy, 303: 123160.
Go to original source... - Wu Q., Mousa M.A.A., Al-Qurashi A.D., Ibrahim O.H.M., Abo-Elyousr K.A.M., Rausch K., Abdel Aal A.M.K., Kamruzzaman M. (2023): Global calibration for non-targeted fraud detection in quinoa flour using portable hyperspectral imaging and chemometrics. Current Research in Food Science, 6: 100483.
Go to original source... - Xu Y., Kong T., Ma Y., Zhao Y., Chu L., Zheng M. (2025): Near-infrared spectroscopy: Application in ensuring food quality and safety. Analytical Methods, 17: 3381-3406.
Go to original source...
Go to PubMed... - Zheng R., Jia Y., Ullagaddi C., Allen C., Rausch K., Singh V., Schnable J.C., Kamruzzaman M. (2024): Optimizing feature selection with gradient boosting machines in PLS regression for predicting moisture and protein in multi-country corn kernels via NIR spectroscopy. Food Chemistry, 456: 140062.
Go to original source...
Go to PubMed...
This is an open access article distributed under the terms of the Attribution 4.0 International (CC BY 4.0.), which permits use, distribution, and reproduction in any medium, provided the original publication is properly cited. No use, distribution or reproduction is permitted which does not comply with these terms.

ORCID...