This study aims to compare the performance of five machine learning algorithms in classifying dry bean varieties as an effort to support quality detection systems for agricultural products. Issues related to authenticity and food safety that frequently occur, such as rice adulteration, highlight the importance of fast and accurate methods for variety identification. The study utilizes the Dry Bean Dataset from the UCI Machine Learning Repository, which consists of 13,611 samples with 16 numerical features and 7 classes of bean varieties. Five algorithms were tested, including K-Nearest Neighbors (KNN), Decision Tree (DT), Support Vector Machine (SVM), Random Forest (RF), and Logistic Regression (LR). The data were divided into 80% for training and 20% for testing, and evaluated using accuracy, precision, recall, and F1-Score metrics. The results show that the SVM algorithm achieved the best performance with an accuracy of 92.43% and an F1-Score of 93.61%, followed by Logistic Regression and Random Forest. The confusion matrix analysis indicates that most varieties were correctly classified, although some misclassifications occurred among classes with similar morphological characteristics such as Dermason, Seker, and Sira. Based on these findings, it can be concluded that selecting the appropriate algorithm is crucial in applying machine learning for agricultural product classification. Evaluation using multiple metrics provides a more comprehensive performance overview compared to relying solely on accuracy. This approach has the potential to support more efficient automation in the identification of agricultural product varieties.
Copyrights © 2025