Traditional Indonesian dishes often contain peanuts, coconut milk, and shrimp which are common allergens. However, allergen information is frequently absent from food vendors and digital recipe sites, posing potential health risks for individual with food allergies. This study presents an automated allergen detection system in Indonesian cuisine that uses a Logistic Regression model and has been trained on 14 primary allergen categories defined by the European Union. Each recipe is converted into a fixed-dimension binary vector using a bag-of-ingredients feature representation. As the evaluation results, the hyperparameter tuning approach significantly improved the model's performance. The model that was not fine-tuned only performed well in Scenario 1 (0 and 1) where it achieved an accuracy of 0.9995. In the Scenario 2 (0 - 3) Grid Search CV improved accuracy to 0.9997. In the Scenario 3 (0 - 14) Random Search achieved the best values with an accuracy of 0.9990 and a balanced precision-recall rate of over 0.97. Compared to the other methods, Random Search appears to be more adaptable to complex data distributions as these results show. Furthermore, this method has the potential to be widely applied to various culinary contexts like oriental and continental cuisines, which often uses high-allergen ingredients such as fermented soy products and dairy-gluten rich dishes. This system contributes to the advancement of food safety and public health through the integration of artificial intelligence in allergen detection.
Copyrights © 2026