A COMPARISON OF THE NAIVE BAYES AND K-NN ALGORITHMS IN PREDICTING THE FRESHNESS OF MILKFISH AT FISH AUCTIONS
Abstract
This research aims to compare the performance of two machine learning algorithms, Naive Bayes and K-Nearest Neighbors (K-NN), in predicting the freshness of milkfish (Chanos chanos) at fish auctions. Predicting fish freshness is an important aspect to ensure product quality and customer satisfaction. The Naive Bayes algorithm, which is based on Bayes' Theorem with the assumption of independence between features, as well as the K-NN algorithm, which uses an instance-based approach to classify data based on proximity to k nearest neighbors, were implemented and tested. Evaluation is carried out using accuracy and Kappa metrics. The results show that Naive Bayes achieved an accuracy of 73.44% with a Kappa value of 0.594, indicating good performance in predicting the freshness of milkfish. In contrast, K-NN shows an accuracy of 68.75% and a Kappa value of 0.461, which means its performance is lower compared to Naive Bayes. Further analysis revealed that Naive Bayes is more computationally efficient and faster at making predictions, making it better suited for real-time applications at fish auctions. However, Naive Bayes has limitations in assuming feature independence which may not always be true in real-world situations. On the other hand, K-NN although more flexible and capable of capturing complex patterns in data, tends to be slow and requires optimization of parameters such as k values to improve its performance. In conclusion, Naive Bayes is recommended for predicting the freshness of milkfish at fish auctions because of its higher accuracy and reliability. Further research is needed to optimize these two algorithms through parameter adjustments and the use of ensemble methods to improve overall prediction performance.
Downloads
References
M. H. Ariansyah Et Al., ‘‘Hybridization Of The Naive Bayes Classification Method In The Freshwater Fish Seed Seller Classification Model’’, Jurnal Teknik Informatika (Jutif), Vol. 4, No. 2, Pp. 421–427, Mar. 2023, Doi: 10.52436/1.Jutif.2023.4.2.715.
Ismawati Ismawati, Rika Diananing Putri, And Astri Furqoni, ‘‘Peningkatan Mutu Produk Bandeng Isi Melalui Metode Pengasapan’’, 2022, Doi: 10.31102/Darmabakti.2022.3.1.067-071.
A. Tenri Abeng And Z. Maulana, ‘‘Pengolahan Produk Ikan Bandeng Di Desa Tekolabbua Kecamatan Pangkajene Kabupaten Pangkep’’, Vol. 3, No. 1, 2019.
R. Mahendra And R. Faurina, ‘‘Fish Freshness Prediction With Convolutional Neural Network Method Based On Fish Eye Image Analysis’’, Jurnal Teknik Informatika (Jutif), Vol. 5, No. 3, Pp. 883–890, Jun. 2024, Doi: 10.52436/1.Jutif.2024.5.3.1351.
T. Jaelani, ‘‘Produksi Ikan Bandeng Capai 11 Ribu Ton Per Tahun’’. Accessed: Jun. 06, 2024. [Online]. Available: Https://Www.Bekasikab.Go.Id/Produksi-Ikan-Bandeng-Capai-11-Ribu-Ton-Per-Tahun
‘‘Produksi Perikanan’’. Accessed: Jun. 09, 2024. [Online]. Available: Https://Statistik.Kkp.Go.Id/Home.Php?M=Prod_Ikan_Prov&I=2#
L. Karlo Tolentino Et Al., ‘‘Fish Freshness Determination Through Support Vector Machine’’, Article In Journal Of Telecommunication, 2017, [Online]. Available: Https://Www.Researchgate.Net/Publication/319152084
A. Yudhana, R. Umar, And S. Saputra, ‘‘Fish Freshness Identification Using Machine Learning: Performance Comparison Of K-Nn And Naïve Bayes Classifier’’, Journal Of Computing Science And Engineering, Vol. 16, No. 3, Pp. 153–164, Sep. 2022, Doi: 10.5626/Jcse.2022.16.3.153.
N. Made Satvika Iswari, ‘‘Perbandingan Algoritma Knn, C4.5, Dan Naive Bayes Dalam Pengklasifikasian Kesegaran Ikan Menggunakan Media Foto’’, 114 Ultimatics, Vol. Ix, No. 2, 2017, [Online]. Available: Https://Www.Cs.Waikato.Ac.Nz/Ml/Weka/
H. Nurdin, S. Suhardjono, A. Wuryanto, D. Yuliandari, And H. Sugiarto, ‘‘Naive Bayes And Particle Swarm Optimization In Early Detection Of Chronic Kidney Disease’’, Jurnal Teknik Informatika (Jutif), Vol. 5, No. 3, Pp. 703–708, May 2024, Doi: 10.52436/1.Jutif.2024.5.3.1750.
L. A. Hayurian And N. Hendrastuty, ‘‘Comparison Of Naïve Bayes Algorithm And Support Vector Machine In Sentiment Analysis Of Boycott Israeli Products On Twitter’’, Jurnal Teknik Informatika (Jutif), Vol. 5, No. 3, Pp. 731–738, May 2024, Doi: 10.52436/1.Jutif.2024.5.3.1813.
M. H. Ariansyah, E. N. Fitri, And S. Winarno, ‘‘Improving Performance Of Students’’ Grade Classification Model Uses Naïve Bayes Gaussian Tuning Model And Feature Selection’’, Jurnal Teknik Informatika (Jutif), Vol. 4, No. 3, Pp. 493–501, Jun. 2023, Doi: 10.52436/1.Jutif.2023.4.3.737.
A. Tejawati, A. Septiarini, R. Rismawati, And N. Puspitasari, ‘‘Comparison Of K-Nearest Neighbor And Naive Bayes Methods For Classification Of News Content’’, Jurnal Teknik Informatika (Jutif), Vol. 4, No. 2, Pp. 401–412, Mar. 2023, Doi: 10.52436/1.Jutif.2023.4.2.676.
Z. Mohammed, C. Hanae, And S. Larbi, ‘‘Comparative Study On Machine Learning Algorithms For Early Fire Forest Detection System Using Geodata’’, International Journal Of Electrical And Computer Engineering, Vol. 10, No. 5, Pp. 5507–5513, Oct. 2020, Doi: 10.11591/Ijece.V10i5.Pp5507-5513.
M. B. Yildiz, E. T. Yasin, And M. Koklu, ‘‘Fisheye Freshness Detection Using Common Deep Learning Algorithms And Machine Learning Methods With A Developed Mobile Application’’, European Food Research And Technology, 2024, Doi: 10.1007/S00217-024-04493-0.
Ni Made Satvika Iswari, Wella, And Ranny, ‘‘Fish Freshness Classification Method Based On Fish Image Using K-Nearest Neighbor’’, International Conference On New Media Studies Yogyakarta, Vol. 8, No. 10, 2017.
Copyright (c) 2024 Harlis Setiyowati, Hendra Mayatopani, Lilik Hariyanto, Muhammad Alfathan Harriz
This work is licensed under a Creative Commons Attribution 4.0 International License.