Optimizing Electronic Nose Performance for Detecting Coconut Sap Preservatives: A Comparative Analysis of Feature Extraction and Machine Learning Techniques
DOI:
https://doi.org/10.48048/tis.2026.11628Keywords:
Coconut Sap, E-nose, MOS Sensor, Feature Extraction, Machine Learning, Preservative, VOCs, Coconut sap, E-nose, Feature extraction, Machine learning, Preservative detection, Food safetyAbstract
Coconut sap, the raw material for coconut sugar, is highly susceptible to rapid fermentation, prompting farmers to use natural or chemical preservatives. Detecting these preservatives is challenging, as conventional techniques like Gas Chromatography-Mass Spectrometry (GC-MS) are costly and impractical for field applications. This study evaluated 3 feature extraction methods—maximum, difference, and integral—using an Electronic Nose (e-nose) to classify sap samples: Without preservatives (S-O (Original Sap)), with natural preservatives (S-NP (Sap with Natural Preservative)), and with chemical preservatives (S-CP (Sap with Chemical Preservative)). Data from ten Metal-Oxide Semiconductor sensors were analyzed using Principal Component Analysis (PCA) and 4 machine learning models: Random Forest (RF), Gradient Boosting (GB), Quadratic Discriminant Analysis, and k-Nearest Neighbor (k-NN). A stratified 5-fold cross-validation protocol was employed to ensure model robustness. The results demonstrated that the integral feature consistently outperformed the other methods, yielding superior PCA cluster separation and classification accuracy. The k-NN model with raw integral features achieved the highest test accuracy of 93.33% and a mean validation accuracy of 86.11%. Although GB with 2PC input also performed well (91.11% test accuracy, 87.78% validation), the k-NN model’s misclassification pattern was safer for food safety, as it avoided labeling S-CP samples as S-O—a high-risk error. Sensors sensitive to organic solvent vapors and alcohols were the most significant contributors to detection accuracy. These findings confirm that integral feature extraction provides a reliable, rapid, and non-destructive method for preservative detection in coconut sap, offering a cost-effective alternative to GC-MS for quality control.
HIGHLIGHTS
- This study evaluates 3 signal feature extraction techniques (maximum, difference, and integral) for processing Electronic Nose (e-nose) data to detect preservative mixtures in coconut sap.
- A stratified 5-fold cross-validation protocol was employed to ensure the robustness and generalizability of the machine learning models, including Random Forest, Gradient Boosting, Quadratic Discriminant Analysis, and k-Nearest Neighbor (k-NN).
- The integral feature extraction method demonstrated superior performance, providing the clearest cluster separation in PCA and achieving the highest classification accuracy of 33%using the k-NN algorithm.
- The k-NN model’s misclassification pattern was identified as the safest for food safety, as it consistently avoided the critical error of mislabeling samples with chemically preservatives (S-CP) as pure (S-O).
- Sensors sensitive to alcohols (S3) and organic solvent vapors (S1, S5) were the most significant contributors to detection accuracy, due to their sensitivity to key volatile compounds produced during fermentation.
- The proposed e-nose system offers a rapid, non-destructive, and cost-effective alternative to conventional GC-MS for quality control in coconut sugar industry.
GRAPHICAL ABSTRACT
Downloads
References
MT Asghar, YA Yusof, MN Mokhtar, ME Ya’acob, HM Ghazali, LS Chang and YN Manaf. Coconut (Cocos nucifera L.) sap as a potential source of sugar: Antioxidant and nutritional properties. Food Science and Nutrition 2020; 8(4), 1777-1787.
J Wiboonsirikul, P Ongkunaruk and P Poonpan. Determining key factors affecting coconut sap quality after harvesting. Heliyon 2024; 10(8), e29002.
H Purnomo. Volatile components of coconut fresh sap, sap syrup and coconut sugar. ASEAN Food Journal 2007; 14(1), 45-49.
KB Hebbar, M Arivalagan, KC Pavithra, TK Roy, M Gopal, KS Shivashankara and P Chowdappa. Nutritional profiling of coconut (Cocos nucifera L.) inflorescence sap collected using novel coco-sap chiller method and its value added products. Journal of Food Measurement and Characterization 2020; 14(5), 2703-2712.
Q Xia, R Li, S Zhao, W Chen, H Chen, B Xin, Y Huang and M Tang. Chemical composition changes of post-harvest coconut inflorescence sap during natural fermentation. African Journal of Biotechnology 2011; 10(66), 14999-15005.
N Udomsaksakul, K Kodama, S Tanasupawat and A Savarajara. Diversity of ethanol fermenting yeasts in coconut inflorescence sap and their application potential. ScienceAsia 2018; 44(5), 371-381.
N Udomsaksakul, K Kodama, S Tanasupawat and A Savarajara. Indigenous Saccharomyces cerevisiae strains from coconut inflorescence sap: Characterization and use in coconut wine fermentation. Chiang Mai University Journal of Natural Sciences 2018; 17(3), 219-230.
Karseno, Erminawati, T Yanto and I Handayani. The effect of coconut sap and skim milk concentration on physicochemical and sensory characteristic of coconut sap drink yogurt. In: Proceedings of the 2nd International Conference on Sustainable Agriculture for Rural Development, Purwokerto, Indonesia. 2021, p. 12045.
R Pandiselvam, MR Manikantan, SM Binu, SV Ramesh, S Beegum, M Gopal, KB Hebbar, AC Mathew, A Kothakota, R Kaavya and S Shil. Reaction kinetics of physico-chemical attributes in coconut inflorescence sap during fermentation. Journal of Food Science and Technology 2021; 58(9), 3589-3597.
BB Borse, LJM Rao, K Ramalakshmi and B Raghavan. Chemical composition of volatiles from coconut sap (neera) and effect of processing. Food Chemistry 2007; 101(3), 877-880.
JD Atputharajah, S Widanapathirana and U Samarajeewa. Microbiology and biochemistry of natural fermentation of coconut palm sap. Food Microbiology 1986; 3(4), 273-280.
Y Somawiharja, DM Wonohadidjojo, M Kartikawati, FRT Suniati and H Purnomo. Indigenous technology of tapping, collecting and processing of coconut (Cocos Nucifera) sap and its quality in Blitar Regency, East Java, Indonesia. Food Research 2018; 2(4), 398-403.
M Chinnamma, S Bhasker, MB Hari, D Sreekumar and H Madhav. Coconut Neera - A vital health beverage from coconut palms: Harvesting, processing and quality analysis. Beverages 2019; 5(1), 22.
R Somashekaraiah, B Shruthi, BV Deepthi and MY Sreenivasa. Probiotic properties of lactic acid bacteria isolated from neera: A naturally fermenting coconut palm nectar. Frontiers in Microbiology 2019; 10, 1382.
J Wrage, S Burmester, J Kuballa and S Rohn. Coconut sugar (Cocos nucifera L.): Production process, chemical characterization, and sensory properties. LWT 2019; 112, 108227.
A Saraiva, C Carrascosa, F Ramos, D Raheem, M Lopes and A Raposo. Coconut sugar: Chemical analysis and nutritional profile; health impacts; safety and quality control; food industry applications. International Journal of Environmental Research and Public Health 2023; 20(4), 3671.
L Sukumaran and M Radhakrishnan. Impact of nisin in combination with sodium benzoate and calcium carbonate on the bacterial and yeast population of coconut neera (Coconut inflorescence sap). Journal of Pure and Applied Microbiology 2021; 15(4), 2050-2058.
D Raharjo, MZ Zaman, D Praseptiangga and A Yunus. Physicochemical and microbiological characteristics of various stem bark extracts of Hopea beccariana Burck potential as natural preservatives of coconut sap. Open Agriculture 2023; 8(1), 20220175.
Mustaufik, L Sutiarso, S Rahayoe and KH Widodo. The effect of time and duration of tapping and the addition of laru as natural preservative in coconut sap quality. In: Proceedings of the 2nd International Conference on Sustainable Agriculture for Rural Development, Purwokerto, Indonesia. 2021, p. 12084.
SB Sulistyo and P Haryanti. Regression analysis for determination of antioxidant activity of coconut sap under various heating temperature and concentration of lysine addition. Food Research 2020; 4(4), 976-981.
P Haryanti, Karseno, I Handayani and SB Sulistyo. The chemical composition of coconut sap at different tapping condition. AIP Conference Proceedings 2023; 2586, 60010.
V Zulfia, M Ainuri, N Khuriyati, R Yusuf, AS Alim and U Pato. Optimizing of the parameters of coconut sugar production using taguchi design in Riau, Indonesia. International Journal on Advanced Science, Engineering and Information Technology 2022; 12(2), 752-758.
Y Gan, T Yang, LP Guo, R Qiu, S Wang, Y Zhang, M Tang and Z Yang. Using HS-GC-MS and flash GC e-nose in combination with chemometric analysis and machine learning algorithms to identify the varieties, geographical origins and production modes of Atractylodes lancea. Industrial Crops and Products 2024; 209, 117955.
Z Gan, Q Zhou, C Zheng and J Wang. Challenges and applications of volatile organic compounds monitoring technology in plant disease diagnosis. Biosensors and Bioelectronics 2023; 237, 115540.
Y Huang, IJ Doh and E Bae. Design and validation of a portable machine learning-based electronic nose. Sensors 2021; 21(11), 3923.
W Yao, H Wu, Y Cai, Y Chen, D Liu and M Zhang. Comprehensive analysis of geographical impact on flavor profiles of braised chicken across Eastern, Central, and Western China using GC-IMS, E-Nose techniques and sensory evaluation. Food Chemistry Advances 2024; 5, 100808.
W Xu, Y He, J Li, J Zhou, E Xu, W Wang and D Liu. Portable beef-freshness detection platform based on colorimetric sensor array technology and bionic algorithms for total volatile basic nitrogen (TVB-N) determination. Food Control 2023; 150, 109741.
C Avian, JS Leu, SW Prakosa and M Faisal. An improved classification of pork adulteration in beef based on electronic nose using modified deep extreme learning with principal component analysis as feature learning. Food Analytical Methods 2022; 15(11), 3020-3031.
Z Li, T Wang, H Jiang, WT Wang, T Lan, L Xu, YH Yun and W Zhang. Comparative key aroma compounds and sensory correlations of aromatic coconut water varieties: Insights from GC×GC-O-TOF-MS, E-nose, and sensory analysis. Food Chemistry: X 2024; 21, 101141.
DR Wijaya, F Afianti, A Arifianto, D Rahmawati and VS Kodogiannis. Ensemble machine learning approach for electronic nose signal processing. Sensing and Bio-Sensing Research 2022; 36, 100495.
MA Khan, I Ashraf, M Alhaisoni, R Damaševičius, R Scherer, A Rehman and SAC Bukhari. Multimodal brain tumor classification using deep learning and robust feature selection: A machine learning application for radiologists. Diagnostics 2020; 10(8), 565.
KO Kombo, N Ihsan, TS Syahputra, SN Hidayat, M Puspita, Wahyono, R Roto and K Triyana. Enhancing classification rate of electronic nose system and piecewise feature extraction method to classify black tea with superior quality. Scientific African 2024; 24(14), e02153.
Y Chen, J Fu, X Weng, J Chen, R Hu and Y Zhu. A feature extractor for temporal data of electronic nose based on parallel long short-term memory network in flavor discrimination of Chinese vinegars. Journal of Food Engineering 2024; 379, 112132.
S Zhai, Z Li, H Zhang, L Wang, S Duan and J Yan. A multilevel interleaved group attention-based convolutional network for gas detection via an electronic nose system. Engineering Applications of Artificial Intelligence 2024; 133, 108038.
Y Chen, X Wang, W Yang, G Peng, J Chen, Y Yin and J Yan. An efficient method for chili pepper variety classification and origin tracing based on an electronic nose and deep learning. Food Chemistry 2025; 479, 143850.
Mustaufik, L Sutiarso, S Rahayu and KH Widodo. Technique engineering of tapping and shelter of coconut sap and its effect on the quality of crystal coconut sugar. Food Research 2022; 6(2), 248-254.
W Chen, Q Zhu, Q Xia, W Cao, S Zhao and J Liu. Reactive oxygen species scavenging activity and DNA protecting effect of fresh and naturally fermented coconut sap. Journal of Food Biochemistry 2011; 35(5), 1381-1388.
YF Sun, SB Liu, FL Meng, JY Liu, Z Jin, LT Kong and JH Liu. Metal oxide nanostructures and their gas sensing properties: A review. Sensors 2012; 12(3), 2610-2631.
Z Jiang, P Xu, Y Du, F Yuan and K Song. Balanced distribution adaptation for metal oxide semiconductor gas sensor array drift compensation. Sensors 2021; 21(10), 3403.
A Khorramifar, M Rasekh, H Karami, U Malaga-Toboła and M Gancarz. A machine learning method for classification and identification of potato cultivars based on the reaction of mos type sensor-array. Sensors 2021; 21(17), 5836.
M Yan, Y Wu, Z Hua, N Lu, W Sun, J Zhang and S Fan. Humidity compensation based on power-law response for MOS sensors to VOCs. Sensors and Actuators B: Chemical 2021; 334, 129601.
Y Lin, J Jing, Y He, X Wang, A Zhong, W Ye, W Xu, X Zhao and X Pan. A fast, non-invasive auxiliary screening algorithm for lung cancer based on electronic nose system. Sensors and Actuators A: Physical 2025; 389, 116490.
M Gopal, S Shil, A Gupta, KB Hebbar and M Arivalagan. Metagenomic investigation uncovers presence of probiotic-type microbiome in Kalparasa® (Fresh Unfermented Coconut Inflorescence Sap). Frontiers in Microbiology 2021; 12, 662783.
F Lu and J Zhang. Drift compensation of the gas sensor based on self-training and semi-supervised learning. In: Proceedings of the 2nd International Conference on Artificial Intelligence, Big Data and Algorithms, Nanjing, China. 2022, p. 799-803.
S Liu, X Chen, X Xia, Y jin, G Wang, H Jia and D Huang. Electronic sensing combined with machine learning models for predicting soil nutrient content. Computers and Electronics in Agriculture 2024; 221, 108947.
Y Sun and Y Zheng. A method of gas sensor drift compensation based on intrinsic characteristics of response curve. Scientific Reports 2023; 13(1), 11971.
X Dong, H Duan, X Xu and S Han. A novel memory mechanism for postponing the drift of chemical gas sensors. In: Proceedings of the 2021 IEEE 11th International Conference on Electronics Information and Emergency Communication, Beijing, China. 2021, p. 1-4.
H Se, K Song, H Liu, W Zhang, X Wang and J Liu. A dual drift compensation framework based on subspace learning and cross-domain adaptive extreme learning machine for gas sensors. Knowledge-Based Systems 2023; 259, 110024.
Chotimah, K Saifullah, FN Laily, M Puspita, KO Kombo, SN Hidayat, ET Sulistyani, Wahyono and K Triyana. Electronic nose-based monitoring of vacuum-packaged chicken meat freshness in room and refrigerated storage. Journal of Food Measurement and Characterization 2024; 18(10), 8825-8842.
J Lever, M Krzywinski and N Altman. Principal component analysis. Nature Methods 2017; 14(7), 641-642.
J Yan, X Guo, S Duan, P Jia, L Wang, C Peng and S Zhang. Electronic nose feature extraction methods: A review. Sensors 2015; 15(11), 27804-27831.
Y Shi, H Lin, Y Yu, C Yin and Y Wang. A gas-spectral bimodal information fusion method combining electronic nose and hyperspectral system to identify the rice quality in different storage periods. IEEE Transactions on Instrumentation and Measurement 2024; 73, 2526611.
G Hu, B Du, X Wang and G Wei. An enhanced black widow optimization algorithm for feature selection. Knowledge-Based Systems 2022; 235, 107638.
G Wei, X Liu, A He, W Zhang, S Jiao and B Wang. Design and implementation of a ResNet-LSTM-Ghost architecture for gas concentration estimation of electronic noses. IEEE Sensors Journal 2024; 24(16), 26416-26428.
Published
Issue
Section
License
Copyright (c) 2025 Walailak University

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



