Abstract
Quality assessment of crude palm oil remains a critical challenge globally, particularly in resource-poor areas where traditional methods are time-consuming and destructive. This study explores machine learning-assisted Raman spectroscopy for non-destructive assessment of peroxide value (PV) and iodine value (IV) in palm oil. Raman spectra were collected from 200 samples from five Ghanaian markets, with second derivative preprocessing significantly enhancing feature resolution. Twelve predictive models were developed by combining three variable selection algorithms (CARS, GA, UVE) with three regression methods (PLS, SVM, RF). The genetic algorithm-random forest (GA-RF) model demonstrated exceptional prediction accuracy for both PV (Rp = 0.9831, RPD = 7.7397) and IV (Rp = 0.9752, RPD = 6.3927). Key spectral regions associated with unsaturation (1287-1657 cm⁻¹) and oxidation (1748-1840 cm⁻¹) were identified as crucial predictors. This approach enables rapid, non-destructive quality assessment with potential applications throughout the palm oil value chain.
Similar content being viewed by others
Data availability
The datasets generated and analyzed during the current study are available from the corresponding author upon reasonable request.
Code availability
Custom scripts used for data analysis are available from the corresponding author upon reasonable request.
References
USDA. Commodity Intelligence Report: Record Palm Oil Production Forecast for Côte d’Ivoire and Ghana (USDA, 2022).
DoCampo, I., Naeve, K., Hodor, R., Afram, A., & Sefa-Nyarko, C. Evaluating How Root Capital’ s Client Businesses Impact Smallholder Livelihoods: Oil Palm in Ghana https://rootcapital.org/wp-content/uploads/2021/04/Root-Capital_PDA-Oil-Palm-Ghana-Impact-Study_FINAL.pdf (2022).
MacArthur, R., Teye, E. & Darkwa, S. Quality and safety evaluation of important parameters in palm oil from major cities in Ghana. Sci. African 13, e00860 (2021).
Enyoh, E. C., Enyoh, C. E. & Amaobi, C. E. Quality assessment of palm oil from different palm oil local factories in Imo State, Nigeria. World Sci. News 88, 152–167 (2017).
Forooghi, E. Applications of Raman spectroscopy in food safety and quality control. J. Hum Health Halal Metr. 4, 70–86 (2024).
Zhao, S. et al. Deep learning and feature reconstruction assisted vis-NIR calibration method for on-line monitoring of key growth indicators during kombucha production. Food Chem. 463, 141411 (2025).
Zhao, H. et al. The application of machine-learning and Raman spectroscopy for the rapid detection of edible oils type and adulteration. Food Chem. 373, 131471 (2022).
Pulassery, S., Abraham, B., Ajikumar, N., Munnilath, A. & Yoosaf, K. Rapid iodine value estimation using a handheld raman spectrometer for on-site, reagent-free authentication of edible oils. ACS Omega 7, 9164–9171 (2022).
Haruna, S. A. et al. Simultaneous quantification of total flavonoids and phenolic content in raw peanut seeds via NIR spectroscopy coupled with integrated algorithms. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 285, 121854 (2023).
Ugo, C. H., Eme, P. E., Eze, P. N., Obajaja, H. A. & Omeili, A. E. Chemical assessment of the quality of palm oil produced and sold in major markets in Orlu zone in Imo state, Nigeria. World J. Adv. Res. Rev. 21, 1025–1033 (2024).
FAO/WHO Codex Alimentarius Commission. Standard for Edible Fats and Oils Not Covered by Individual Standards (CXS 19‑1981), Codex Alimentarius Commission, Rome (2023).
Agbaire, P. O. Quality assessment of palm oil sold in some major markets in Delta State, southern Nigeria. African J. Food Sci. Technol. 3, 223–226 (2012).
Ngunoon, P., Ngoholve, R. & Omodele, S. Chemical analysis of palm oil used in some parts of Benue State, Nigeria. Int. J. Adv. Res. Chem. Sci. 4, 12–17 (2017).
Qiu, J., Hou, H. Y., Yang, I. S. & Chen, X. B. Raman spectroscopy analysis of free fatty acid in olive oil. Appl. Sci. 9, 4510 (2019).
Vaskova, H. & Buckova, M. Multivariate study of Raman spectral data of edible oils. WSEAS Trans. Environ. Dev. 14, 226–232 (2018).
Berghian-Grosan, C. & Magdas, D. A. Raman spectroscopy and machine-learning for edible oils evaluation. Talanta 218, 121176 (2020).
Haruna, S. A. et al. Application of NIR spectroscopy for rapid quantification of acid and peroxide in crude peanut oil coupled multivariate analysis. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 267, 120624 (2022).
Huzortey, A. A., Owusu, A. & Anderson, B. Raman spectra recovery using a second derivative technique and range independent baseline correction algorithm. OSA Contin. 4, 2468–2480 (2021).
Guerra-lo, R., Gu, A., Omar, C. & Ve, D. Infrared and Raman studies on renal stones: the use of second derivative infrared spectra. Urol. Res. 38, 383–390 (2010).
Santos, D. et al. Spectral analysis to improve inputs to random forest and other boosted ensemble tree-based algorithms for detecting NYF pegmatites in Tysfjord, Norway. Remote Sens. 14, 3532 (2022).
Nunekpeku, X. et al. Gel strength prediction in ultrasonicated chicken mince: Fusing near-infrared and Raman spectroscopy coupled with deep learning LSTM algorithm. Food Control 168, 110916 (2025).
Li, H., Sheng, W., Adade, S. Y. S. S., Nunekpeku, X. & Chen, Q. Investigation of heat-induced pork batter quality detection and change mechanisms using Raman spectroscopy coupled with deep learning algorithms. Food Chem. 461, 140798 (2024).
Zulfiqar, M., Kamran, M., Rasheed, M. B., Alquthami, T. & Milyani, A. H. Hyperparameter optimization of support vector machine using adaptive differential evolution for electricity load forecasting. Energy Rep. 8, 13333–13352 (2022).
Syarif, I. & Wills, G. SVM parameter optimization using grid search and genetic algorithm to improve classification performance. https://doi.org/10.12928/telkomnika.v14i4.3956 (2016).
Adugna, T., Xu, W. & Fan, J. Comparison of random forest and support vector machine classifiers for regional land cover mapping using coarse resolution FY-3C images. Remote Sens. 14, 574 (2022).
Breiman, L. E. O. Random Forests 5–32 (Kluwer Academic Publishers, 2001).
Barreñada, L. et al. Understanding overfitting in random forest for probability estimation: a visualization and simulation study. Diagn. Progn. Res. 1–14. https://doi.org/10.1186/s41512-024-00177-1 (2024).
Barea-sepúlveda, M. et al. Comparison of different processing approaches by SVM and RF on HS-MS eNose and NIR Spectrometry data for the discrimination of gasoline samples. Microchem. J. 172, 106893 (2022).
Wei, S. & Xing, X. A new machine learning approach in detecting the oil palm plantations using remote sensing data. Remote Sens. 13, 236 (2021).
Yee, E. et al. Examining the synergistic effects through machine learning prediction and optimisation in the anaerobic Co-digestion (ACoD) of palm oil mill effluent (POME) and decanter cake (DC) with economic analysis. J. Clean. Prod. 437, 140666 (2024).
Liu, H., Chen, Y., Shi, C., Yang, X. & Han, D. FT-IR and Raman spectroscopy data fusion with chemometrics for simultaneous determination of chemical quality indices of edible oils during thermal oxidation. LWT 119, 108906 (2020).
Vinet, J., Tréguier, S., Levasseur-Garcia, C., Calmon, A. & Violleau, F. Iodine and peroxide index rapid determination by mid- and near-infrared spectroscopy in ozonated sunflower oil and ozonated fats. Ozone Sci. Eng. 44, 337–350 (2022).
Geng, Z. et al. Engineering applications of artificial intelligence risk prediction model for food safety based on improved random forest integrating virtual sample. Eng. Appl. Artif. Intell. 116, 105352 (2022).
Lam, K. et al. Food Hydrocolloids Use of random forest analysis to quantify the importance of the structural characteristics of beta-glucans for prebiotic development. Food Hydrocoll. 108, 106001 (2020).
FAO/WHO Codex Alimentarius Commission. Standard for Named Vegetable Oils (CXS 210–1999), Codex Alimentarius Commission, Rome (2022).
Allah, M. D. et al. Use of Raman spectroscopy for analysis and detection of some Sudanese edible oils. Optics 10, 23 (2021).
Johnson, N. A. N., Adade, S. Y. S. S., Haruna, S. A., Ekumah, J. N. & Ma, Y. Quantitative assessment of phytochemicals in chickpea beverages using NIR spectroscopy. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 307, 123623 (2024).
Adade, S. Y.-S. S. et al. Rapid quantitative analysis of acetamiprid residue in crude palm oil using SERS coupled with random frog (RF) algorithm. J. Food Compos. Anal. 125, 105818 (2024).
Adade, S. Y.-S. S. et al. Advanced food contaminant detection through multi-source data fusion: strategies, applications, and future perspectives. Trends Food Sci. Technol. 156, 104851 (2025).
Haruna, S. A. et al. Rapid and simultaneous quantification of phenolic compounds in peanut (Arachis hypogaea L.) seeds using NIR spectroscopy coupled with multivariate calibration. J. Food Compos. Anal. 123, 105516 (2023).
Lin, H. et al. Advanced Technologies for Physical Properties Measurement of Food and Its Processing (Springer Nature Singapore, 2025).
Di, C. V., Marsal, L. F., Callao, M. P. & Ruisánchez, I. Spectrochimica Acta Part A: Molecular and Biomolecular Spectroscopy Surface Enhanced Raman Spectroscopy (SERS) and multivariate analysis as a screening tool for detecting Sudan I dye in culinary spices. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 87, 135–141 (2012).
Zhao, S. et al. On-line monitoring of total sugar during kombucha fermentation process by near-infrared spectroscopy: Comparison of linear and non-linear multiple calibration methods. Food Chem. 423, 136208 (2023).
Haruna, S. A. et al. Intelligent evaluation of free amino acid and crude protein content in raw peanut seed kernels using NIR spectroscopy paired with multivariable calibration. Anal. Methods 2989–2999. https://doi.org/10.1039/d2ay00875k(2022).
Ekumah, J. et al. Nondestructive prediction and classification of gel strength in ethanol-treated kudzu starch gels using near-infrared spectroscopy. Food Chem. 476, 143357 (2025).
Zhang, K., Kwadzokpui, B. A., Adade, S. Y. S. S., Lin, H. & Chen, Q. Quantitative and qualitative detection of target heavy metals using anti-interference colorimetric sensor Array combined with near-infrared spectroscopy. Food Chem. 459, 140305 (2024).
Zheng, P. et al. Online system for monitoring the degree of fermentation of and image-processing technologies. Foods 13, 1708 (2024).
Zhao, S. et al. A rapid method for detecting L-Theanine during kombucha fermentation using SERS combined with machine/deep learning. Microchem. J. 206, 111557 (2024).
Hwang, S. W. et al. Feature importance measures from random forest regressor using near ‑ infrared spectra for predicting carbonization characteristics of kraft lignin ‑ derived hydrochar. J. Wood Sci. 1–12. https://doi.org/10.1186/s10086-022-02073-y (2023).
Torrisi, S. B., Hung, L. & Carbone, M. R. Random forest machine learning models for interpretable X-ray absorption near-edge structure spectrum-property relationships. npj Comput. Mater. https://doi.org/10.1038/s41524-020-00376-6 (2020).
Álvarez-Pato, V. M., Sánchez, C. N., Domínguez-Soberanes, J., Méndoza-Pérez, D. E. & Velázquez, R. A multisensor data fusion approach for predicting consumer acceptance of food products. Foods 9, 1–19 (2020).
Zareef, M. et al. An overview on the applications of typical non-linear algorithms coupled with NIR spectroscopy in food analysis. Food Eng. Rev. 3, 35–41 (2020).
Acknowledgements
The authors give special thanks to all the non-destructive research teams at Jimei University and the families for their immense support throughout this work. This work was financially supported by the National Natural Science Foundation of China (Grant No. W2433091).
Author information
Authors and Affiliations
Contributions
Conceptualization: S.Y.-S.S.A.; methodology: A.A.A., H.L., H.H.L.; investigation: S.Y.-S.S.A., N.A.N.J.; formal analysis: J.-N.E., H.H.L.; data curation: X.N.; software: X.N.; validation: A.A.A., B.A.K.; writing—original draft preparation: S.Y.-S.S.A.; writing—review and editing: B.A.K., H.L., H.H.L.; visualization: J.-N.E.; supervision: Q.C.; project administration: N.A.N.J. All authors have read and approved the final version of the manuscript.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Adade, S.YS.S., Agyekum, A.A., Nunekpeku, X. et al. Machine learning-assisted Raman spectroscopy for non-destructive analysis of crude palm oil quality. npj Sci Food (2026). https://doi.org/10.1038/s41538-025-00688-1
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41538-025-00688-1


