Comparison of K-NN and Naive Bayes Algorithms for Identification of Star Fruit Ripeness Using RGB-Based Digital Images

Isi Artikel Utama

Iif Alfiatul Mukaromah
Yusuf Heriyanto

Abstrak

Automatically identifying fruit ripeness is an important aspect in the sorting and distribution of agricultural products, including star fruit, which has economic value. This study aims to analyze and compare the performance of two classification algorithms, namely K-Nearest Neighbor (K-NN) and Naive Bayes, in identifying the ripeness level of star fruit based on digital images. The process begins with capturing images of star fruit in three ripeness categories: unripe, semi-ripe, and ripe. Next, color feature extraction is performed using the average value of the Red, Green, and Blue (RGB) components of the image. These features are then used as input for each classification algorithm. Evaluation is carried out based on accuracy, precision, and recall metrics to assess the performance of each model. The results show that both algorithms are able to classify the ripeness level quite well, but the K-NN algorithm shows superior performance compared to Naive Bayes in the context of the dataset used.

Rincian Artikel

Bagian
Artikel