bit-Tech
Vol. 8 No. 2 (2025): bit-Tech

Implementation of the KNN Algorithm for Food Recommendation System Based on Users' Nutritional Needs

Silvia Mairiani Rosdilillah (Universitas Teknologi Yogyakarta)
Agus Suhendar (Universitas Teknologi Yogyakarta)



Article Info

Publish Date
10 Dec 2025

Abstract

This study develops a web-based food recommendation system using the K-Nearest Neighbors (KNN) algorithm to provide personalized food recommendations based on users' nutritional needs and preferences. Many individuals struggle to create balanced diets due to insufficient knowledge or time, which can lead to malnutrition or obesity. To address this, the system calculates users' nutritional needs using Basal Metabolic Rate (BMR) and Total Daily Energy Expenditure (TDEE), incorporating preference filtering provided by users. The KNN algorithm then analyzes a food database to identify items that best match the users' nutritional profiles. The system features two primary interfaces: a user interface for inputting nutritional data and displaying recommendations, and an administrative interface for managing food data, user information, and recommendation history. The system was evaluated through Black Box Testing, which confirmed that all main features function as intended. The KNN algorithm demonstrated effectiveness by providing relevant food recommendations that align with users' individual nutritional requirements. Key evaluation metrics, such as recommendation accuracy and user satisfaction, validate the system's performance. This approach highlights the system’s potential in offering personalized nutrition advice, with a focus on real-time decision-making. Future work will aim to incorporate additional dietary factors and expand the food database to enhance the system’s adaptability and precision.

Copyrights © 2025






Journal Info

Abbrev

bt

Publisher

Subject

Computer Science & IT

Description

The bit-Tech journal was developed with the aim of accommodating the scientific work of Lecturers and Students, both the results of scientific papers and research in the form of literature study results. It is hoped that this journal will increase the knowledge and exchange of scientific ...