Journal of Computer Science and Informatics Engineering
Vol 5 No 4 (2026)

Explainable Machine Learning for Food Allergen Detection Using Tree-Based Ensembles

Bakti Amirul Jabar (Bina Nusantara University)
Martin Halim (Bina Nusantara University)
Richard Edsel Wijaya (Bina Nusantara University)
Hansel Mitchell Tumanggor (National Taiwan University of Science and Technology)



Article Info

Publish Date
09 Nov 2026

Abstract

Food product allergen annotations are relevant to ingredient-related classification, although dataset-label prediction must be distinguished from laboratory-confirmed allergen detection. This study compares four tree-based machine learning models XGBoost, AdaBoost, Decision Tree, and Random Forest using a secondary food ingredient dataset containing 399 records from Kaggle. An 80:20 training–testing split was used, and models were assessed using accuracy, precision, recall, and F1-score. In the reported 80-record test set, Random Forest achieved the highest accuracy (0.86), with a class-1 F1-score of 0.91, a macro-average F1-score of 0.82, and class-0 recall of 0.65. SHapley Additive exPlanations (SHAP) were used to interpret Random Forest predictions; fat/oil attributes, including olive oil and butter, were prominent model-associated features. These associations describe patterns learned from the dataset rather than causal or biologically verified effects. The findings should be viewed as preliminary, dataset-specific classification results; external validation and additional evaluation are required before any food-safety application

Copyrights © 2026






Journal Info

Abbrev

cosie

Publisher

Subject

Computer Science & IT

Description

Artificial Intelligence Machine Learning Natural Language Processing Computer Vision Text Speech Text Mining Data mining Cryptography Data visualization Expert System Deep Learning Fuzzy Logic IoT and smart environments Neural Networks Pattern Recognition Image Processing Optimization Digital Signal ...