KLASIFIKASI MAKANAN BERDASARKAN NILAI GIZI MENGGUNAKAN ALGORITMA RANDOM FOREST DAN TEKNIK SMOTE - Br Bangun, Elsi Titasari; Bayu Anugerah Putra; Aryanto (Department of Information System Muhammadiyah University of Riau, 2025)
Classifying food based on nutritional content is essential for developing personalized dietary recommendation systems and promoting healthier eating habits. This study aims to construct a food classification model using the Random Forest algorithm combined with the Synthetic Minority Oversampling Technique (SMOTE) to address class imbalance in the dataset. The dataset includes various nutritional attributes such as calories, protein, fat, carbohydrates, fiber, sugar, sodium, and cholesterol, along with additional information such as food category and meal time. After preprocessing, the data were split into training and testing sets, with SMOTE applied to the training data to improve class representation. The model was trained using Random Forest and evaluated using accuracy, precision, recall, and F1-score. The results show that the model achieved an accuracy of 83.35% and an average F1-score above 0.80, with the best performance observed in majority classes. The confusion matrix analysis indicates that most predictions were accurate, although misclassifications occurred among classes with overlapping nutritional values. Protein, calories, and carbohydrates were identified as the most influential features in the classification process. These results show that combining Random Forest and SMOTE works well for creating food classification systems using nutritional data and could be useful in apps for diet recommendations and managing nutrition.