Rapid Prediction of Total Gingerol Content and Harvest Age Classification of Fresh Indonesian Red Ginger Using UV-Vis Spectroscopy
Abstract
Red ginger (Zingiber officinale var. rubrum) is a potential spice commodity widely used in the food and pharmaceutical industries due to its high gingerol content, which has antioxidant, anti-inflammatory, and anticancer properties. This study aims to develop a predictive model for gingerol content and a classification model for harvest age in Indonesian fresh red ginger using chemometrics and machine learning based on Ultraviolet-Visible (UV-Vis) spectroscopy. Samples from three harvest ages (7, 8, and 9 months after planting) were analyzed using a UV-Vis spectrometer. UV-Vis spectral data were acquired and processed using several spectral preprocessing techniques, namely baseline correction, Savitzky-Golay (SGs), Multiplicative Scatter Correction (MSC), and first derivative (D1). The analysis was performed using Partial Least Squares (PLS) and Artificial Neural Network (ANN) for prediction, as well as Principal Component Analysis (PCA), Linear Discriminant Analysis (LDA), k-NN, Random Forest, and Support Vector Machine (SVM) for harvest age classification. The ANN paired with SGs+D1 with 2 hidden nodes achieved the best predictive performance (R² = 0.66, r = 0.74), with RMSEC and RMSEP of 0.7062 and 0.8317, respectively. Meanwhile, the SVM model with a combination of Baseline+D1 preprocessing achieved a harvest age classification accuracy of 0.91 and precision, recall, and F1-score of 0.93 each. The findings of this research yield significant practical implications for both advanced post-harvest technology and the phytopharmaceutical industry. By delivering a highly precise classification model, this work lays a solid technical foundation required to design high-throughput, automated, and cost-effective sorting systems tailored for fresh Indonesian red ginger matrices.
References
Ahmed, S. H. H., T. Gonda, and A. Hunyadi (2021). Medicinal Chemistry Inspired by Ginger: Exploring the Chemical Space around 6-Gingerol. RSC Advances, 11(43); 26687–26699.
Alharbi, K. S., M. S. Nadeem, O. Afzal, S. I. Alzarea, A. S. Altamimi, W. H. Almalki, B. Mubeen, S. Iftikhar, L. Shah, and I. Kazmi (2022). Gingerol, a Natural Antioxidant, Attenuates Hyperglycemia and Downstream Complications. Metabolites, 12(12); 1274.
Bellik, Y. (2014). Total Antioxidant Activity and Antimicrobial Potency of the Essential Oil and Oleoresin of Zingiber officinale Roscoe. Asian Pacific Journal of Tropical Disease, 4(1); 40–44.
Blanco, M. and I. Villarroya (2002). NIR Spectroscopy: A Rapid-Response Analytical Tool. Trends in Analytical Chemistry, 21; 240–250.
Cahyani, I. M., Adhyatmika, E. Lukitaningsih, and T. N. S. Sulaiman (2023). Development and Validation of the RP-HPLC Method for Dexamethasone Sodium Phosphate Determination in Nasal Chitosan Microsphere Preparations. Science and Technology Indonesia, 8(4); 636–644.
CAMO (2015). The Unscrambler Method Reference. CAMO Software AS.
Castillejos-Mijangos, L. A., A. Acosta-Caudillo, T. Gallardo-Velázquez, G. Osorio-Revilla, and C. Jiménez-Martínez (2022). Uses of FT-MIR Spectroscopy and Multivariate Analysis in Quality Control of Coffee, Cocoa, and Commercially Important Spices. Foods, 11(4); 579.
Cen, H. and Y. He (2007). Theory and Application of Near Infrared Reflectance Spectroscopy in Determination of Food Quality. Trends in Food Science & Technology, 18(2); 72–83.
Eilers, P. H. and H. F. Boelens (2005). Baseline Correction with Asymmetric Least Squares Smoothing. Leiden University Medical Centre Report, 1(1); 5.
Elfaky, M. A., H. M. Okairy, H. M. Abdallah, A. E. Koshak, G. A. Mohamed, S. R. Ibrahim, A. A. Alzain, W. A. Hegazy, E.-S. Khafagy, and N. M. Seleem (2024). Assessing the Antibacterial Potential of 6-Gingerol: Combined Experimental and Computational Approaches. Saudi Pharmaceutical Journal, 32(5); 102041.
Fareid, M. A., G. M. El-Sherbiny, N. M. Elafandy, N. E. El-Toum, M. S. Othman, M. H. Sharaf, A. M. Shehabeldine, E. E. Farghal, and F. A. Hamada (2025). Shogaol from Zingiber officinale: Antimicrobial, Anti-Virulence, and Therapeutic Potential against Foodborne Pathogens and Beyond. Progress in Biomaterials, 14(1).
Granato, D., J. S. Santos, G. B. Escher, B. L. Ferreira, and R. M. Maggio (2018). Use of Principal Component Analysis (PCA) and Hierarchical Cluster Analysis (HCA) for Multivariate Association between Bioactive Compounds and Functional Properties in Foods: A Critical Perspective. Trends in Food Science & Technology, 72; 83–90.
Guo, F., C. Yang, C. Zang, Y. Shang, B. Zhang, H. Yu, C. Li, and S. Duan (2019). Comparison of the Quality of Chinese Ginger Juice Powders Prepared by Different Drying Methods. Journal of Food Process Engineering, 42(7); e13252.
Gusti, N., D. Oktarina, R. Elvia, E. Nursa’adah, R. W. Wardhana, A. Sudaryono, and M. L. Firdaus (2021). Facile Detection of Oil Adulteration Using UV-Visible Spectroscopy Coupled with Chemometrics Analysis. Science and Technology Indonesia, 6(1); 14–18.
Hagan, M. T. and M. B. Menhaj (1994). Training Feedforward Networks with the Marquardt Algorithm. IEEE Transactions on Neural Networks, 5(6); 989–993.
Ho, S. C. and M. S. Su (2015). Optimized Heat Treatment Enhances the Anti-Inflammatory Capacity of Ginger. International Journal of Food Properties, 19(8); 1884–1898.
Hollas, J. M. (2004). Modern Spectroscopy. John Wiley & Sons.
Johnson, J. B., J. S. Mani, K. B. Walsh, and M. Naiker (2021). Measurement of Gingerols and 6-Shogaol in Ginger Using Near-Infrared Spectroscopy. In The International Conference on NIR. Springer, pages 81–90.
Maisaroh, P. Atmaji, Astuti, W. B. Setianto, E. Restiawaty, and Y. Bindar (2025). Headspace Gas Chromatography/Mass Spectroscopy Analysis of Volatile Organic Compounds in Red Ginger (Zingiber officinale var. rubrum): Effects of Drying on Chemical and Functional Properties. In IOP Conference Series: Earth and Environmental Science, volume 1477. IOP Publishing, page 012068.
Maldonado, L. M., K. Marcinkevicius, A. R. Alvarez, V. M. Salomon, M. Gaggiotti, N. Messina, M. A. Palacio, S. Medina, M. M. Maldonado, and E. Orellano (2023). UV-Vis Spectroscopy and Chemometric: A Simple Method to Differentiate Honey, Partially Ripe Honey and Nectars. RIA. Revista de Investigaciones Agropecuarias, 49(3); 110–118.
Mäntele, W. and E. Deniz (2017). UV–VIS Absorption Spectroscopy: Lambert-Beer Reloaded. Spectrochimica Acta Part A: Molecular and Biomolecular Spectroscopy, 173; 965–968.
Massart, D. L., B. G. Vandeginste, L. M. C. Buydens, P. J. Lewi, J. Smeyers-Verbeke, and S. de Jong (1998). Handbook of Chemometrics and Qualimetrics. Elsevier Science Inc.
Munir, N., M. Nugent, D. Whitaker, and M. McAfee (2021). Machine Learning for Process Monitoring and Control of Hot-Melt Extrusion: Current State of the Art and Future Directions. Pharmaceutics, 13(9); 1432.
Naskar, S., D. Sing, S. Banerjee, A. Shcherbakova, A. Bandyopadhyay, A. Kar, P. K. Haldar, N. Sharma, P. K. Mukherjee, and R. Bandyopadhyay (2025). Rapid Quality Assessment and Traceability of Ginger Powder from Northeast India and Indian Market Based on Near Infrared Spectroscopic Fingerprinting. Phytochemical Analysis, 36(2); 369–376.
of Statistics, B. C. B. (2024). Production of Biofarmaka (Medicinal) Crops, 2021–2023.
Park, B., J. A. Abbott, K.-J. Lee, C. H. Choi, and K. H. Choi (2003). Near-Infrared Diffuse Reflectance for Quantitative and Qualitative Measurement of Soluble Solids and Firmness of Delicious and Gala Apples. Transactions of the ASAE, 46(6); 1721–1731.
Pasquini, C. (2003). Near Infrared Spectroscopy: Fundamentals, Practical Aspects and Analytical Applications. Journal of the Brazilian Chemical Society, 14(2); 198–219.
Prasad, S. and A. K. Tyagi (2015). Ginger and Its Constituents: Role in Prevention and Treatment of Gastrointestinal Cancer. Gastroenterology Research and Practice, 2015(1); 142979.
Qu, L. and Y. Pei (2024). A Comprehensive Review on Discriminant Analysis for Addressing Challenges of Class-Level Limitations, Small Sample Size, and Robustness. Processes, 12(7); 1382.
Rahmawati, F. Y., Y. R. Utami, M. A. Zahra, and I. Maryati (2022). Naturopathic Therapy Efforts: Potential Gingerol Content in Ginger (Zingiber officinale) as an Antidiabetic. Journal of Nursing Care, 5(1); 50–58.
Rahmawati, L., S. Widodo, D. P. Kurniadi, P. Daud, A. Triyono, Sriharti, N. D. Susanti, N. K. I. Mayasti, A. Indriati, L. E. Yulianti, et al. (2023). Determination of Colorant Type in Yellow Tofu Using Vis-NIR and SW-NIR Spectroscopy. Food Science and Technology, 43; e112422.
Razavi, R. and R. E. Kenari (2023). Ultraviolet-Visible Spectroscopy Combined with Machine Learning as a Rapid Detection Method to Predict Adulteration of Honey. Heliyon, 9(10); e20973.
Rinnan, Å., F. van den Berg, and S. B. Engelsen (2009). Review of the Most Common Pre-Processing Techniques for Near-Infrared Spectra. TrAC – Trends in Analytical Chemistry, 28(10); 1201–1222.
Riwu, A. G., J. Nugraha, D. A. Purwanto, and E. A. Triyono (2023). Determination of (+)-Catechin and Antioxidant Activity in Faloak (Sterculia quadrifida R. Br.) Stem Bark Infusion. Science and Technology Indonesia, 8(1); 59–65.
Rumelhart, D. E., G. E. Hinton, and R. J. Williams (1986). Learning Representations by Back-Propagating Errors. Nature, 323(6088); 533–536.
Salamah, N., R. A. Firdaus, A. Guntarti, M. Ahda, A. H. Uddin, and M. F. Kurniawan (2025). Analysis of Hydrolyzed Collagen in Facial Serum for Halal Authentication Using FTIR Spectroscopy and Multivariate Calibration. Science and Technology Indonesia, 10(4); 1270–1279.
Sembiring, B. B., S. Suhirman, C. Winarti, H. Haris, T. H. Siregar, E. Maryana, N. Harimurti, F. Manoi, and I. Agustinisari (2025). Physical and Chemical Properties of Rat Taro Simplicia from Various Drying Methods. The Scientific World Journal, 2025(1); 6239186.
Sinaga, B. (2026). Crop Yield Prediction Using Artificial Neural Network with Principal Component Analysis (PCA) Dimensionality Reduction. Journal of Information Technology and Computer Science, 11(1); 34–45.
Siregar, T., U. Ahmad, Sutrisno, and A. Maddu (2018). Fluorescence Spectroscopy Characteristics of Indonesian Citrus. In Journal of Physics: Conference Series, volume 1057. IOP Publishing, page 012011.
Skoog, D. A., D. M. West, F. J. Holler, S. R. Crouch, et al. (1996). Fundamentals of Analytical Chemistry, volume 33. Saunders College Publishing.
Subositi, D., H. Widodo, R. Mujahid, N. Rahmawati, F. Mustofa, M. Indrian, S. Haryanti, I. Sholikhah, A. Maruzy, and Y. Widiyastuti (2022). Genetic Diversity and Chemical Profile of Ginger (Zingiber officinale Roscoe) in Indonesia. International Journal on Advanced Science, Engineering and Information Technology, 12(3); 929–936.
Sukweenadhi, J., P. D. Damitasari, K. Kartini, P. Christanti, and E. N. Putri (2023). Gingerol and Shogaol on Red Ginger Rhizome (Zingiber officinale var. rubrum) Using High-Performance Liquid Chromatography. Pharmaciana, 13(2); 166.
Wala, K., W. Szlasa, N. Sauer, P. Kasperkiewicz-Wasilewska, A. Szewczyk, J. Saczko, N. Rembiałkowska, J. Kulbacka, and D. Baczyńska (2022). Anticancer Efficacy of 6-Gingerol with Paclitaxel against Wild Type of Human Breast Adenocarcinoma. Molecules, 27(9).
Wang, S., C. Zhang, G. Yang, and Y. Yang (2014). Biological Properties of 6-Gingerol: A Brief Review. Natural Product Communications, 9(7); 1027–1030.
Williams, P. and K. Norris (1987). Near-Infrared Technology in the Agricultural and Food Industries.
Wold, S., M. Sjöström, and L. Eriksson (2001). PLS-Regression: A Basic Tool of Chemometrics. Chemometrics and Intelligent Laboratory Systems, 58(2); 109–130.
You, H., B. Ireland, M. Moeszinger, H. Zhang, L. Snow, S. Krepich, and V. Takagawa (2019). Determination of Bioactive Nonvolatile Ginger Constituents in Dietary Supplements by a Rapid and Economic HPLC Method: Analytical Method Development and Single-Laboratory Validation. Talanta, 194; 795–802.
Yu, D. X., S. Guo, X. Zhang, H. Yan, Z. Y. Zhang, X. Chen, J. Y. Chen, S. J. Jin, J. Yang, and J. A. Duan (2022). Rapid Detection of Adulteration in Powder of Ginger (Zingiber officinale Roscoe) by FT-NIR Spectroscopy Combined with Chemometrics. Food Chemistry: X, 15.
Yücel, Ç., G. Ş. Karatoprak, Ö. B. Açıkara, E. K. Akkol, T. H. Barak, E. Sobarzo-Sánchez, M. Aschner, and S. Shirooie (2022). Immunomodulatory and Anti-Inflammatory Therapeutic Potential of Gingerols and Their Nanoformulations. Frontiers in Pharmacology, 13; 902551.
Yudha S., S., E. Angasa, M. A. Reagen, and M. Kazi (2024). Molecular Spectroscopic (FTIR and UV-Vis) Analysis and In Vitro Antibacterial Investigation of a Deep Eutectic Solvent of N,N-Dimethyl Urea-Citric Acid. Science and Technology Indonesia, 9(1); 167–172.
Zhang, S., X. Kou, H. Zhao, K. K. Mak, M. K. Balijepalli, and M. R. Pichika (2022). Zingiber officinale var. rubrum: Red Ginger's Medicinal Uses. Molecules, 27(3); 775.
Authors

This work is licensed under a Creative Commons Attribution 4.0 International License.