Comparison of Support Vector Machine and Naïve Bayes Algorithms on Date Fruit Type Classification based on Hue Saturation Value Image - Br. Keliat, Mia Risa; Ikhsan, Muhammad (Program Studi Sistem Informasi Fakultas Teknik dan Ilmu Komputer, 2025)
Dates are a popular fruit in Indonesia, especially during the month of Ramadan. With the increase in consumption, an automated system is needed to classify different types of dates to avoid misidentification. This study compares two classification algorithms: Support Vector Machine (SVM) and Naïve Bayes. The research compares the performance of the Support Vector Machine (SVM) and Gaussian Naïve Bayes algorithms in classifying date fruits based on Hue, Saturation, Value (HSV) images. The dataset consists of 200 images of dates from four types: Ajwa Dates, Sukari Dates, Golden Valley Dates, and Deglet Nour Dates, with a 70% training data and 30% testing data split. The images were captured using a high-resolution smartphone camera under controlled lighting conditions to ensure consistent image quality. The segmentation process includes converting from RGB (original), grayscale, binary, complement operation, filling holes, and conversion to the HSV color space. MATLAB tools were used to implement the algorithms and evaluate model performance. The results show that Gaussian Naïve Bayes outperforms the SVM with a higher accuracy of 80.00%, precision of 79.74%, recall of 78.46%, and F1-score of 79.09%. In contrast, the SVM with a linear kernel only achieved an accuracy of 66.67%, precision of 52.49%, recall of 65.00%, and F1-score of 58.08%. Evaluation showed that neither model suffered from overfitting. Based on the GUI analysis, Naïve Bayes proved superior in classifying the types of dates. This study makes a significant contribution to the development of an automated image-based system for classifying agricultural products.