Iidris Fikri
Information Technology Study Program, Faculty of Science and Technology, Ibrahimy Sukorejo University

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

Comparison of KNN and Logistic Regression Algorithms in Classifying Food Product Healthiness Based on Nutritional Information Iidris Fikri; Ahmad Homaidi; Syarif Aminul Khoiri
JURNAL TEKNOLOGI DAN OPEN SOURCE Vol. 9 No. 1 (2026): Jurnal Teknologi dan Open Source, June 2026
Publisher : Universitas Islam Kuantan Singingi

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.36378/jtos.v9i1.5626

Abstract

This research was conducted to analyze and compare the effectiveness of the K-Nearest Neighbor (KNN) and Logistic Regression algorithms in identifying the health category of food products using nutritional information. The dataset employed in this study was collected from Kaggle in CSV format and consisted of several nutritional attributes, including energy, fat, protein, sugar, and sodium content. The research methodology followed a data mining process that included preprocessing, data normalization, model training, and performance evaluation through a confusion matrix. Furthermore, a web-based classification application was created using the PHP programming language to assist in testing and simulating the product classification process. The experimental results indicated that the K-Nearest Neighbor algorithm achieved an accuracy value of 84.25%, with a precision of 0.82 and a recall of 0.78. Meanwhile, Logistic Regression produced an accuracy of 82.88%, a precision of 0.81, and a recall of 0.83. Based on these findings, the K-Nearest Neighbor method demonstrated slightly better performance in classifying the healthiness of food products.