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.
Copyrights © 2024