Implementation of The Weighted K-Nearest Neighbors Algorithm in The Classification of Beef and Pork Images - Afrianto, Nurdi; Meiditra, Irzon (Journal of INISTA, 2024)
The demand for meat in Indonesia is still high, especially for the consumption of beef and pork, which are important commodities in the market. Although meat provides essential nutrients, pork has health risks because it contains more than 40 dangerous pathogens and various bacteria. In traditional markets in Indonesia, the fraudulent practice of mixing pork and beef to gain greater profits is a serious problem. This is very detrimental to consumers, especially Muslims who do not consume pork. The study used machine learning, the Weighted K-nearest neighbor (WKNN) algorithm, to classify meat based on color features. The stages used began with collecting a dataset of 400 images and divided into 200 images of pork and beef for each. Images were taken using a Canon EOS Kiss X50 DSLR camera at ISO 100-200 for good image quality. Feature extraction uses HSV and RGB algorithms that focus on color. Furthermore, the data is divided into 70% for training and 30% for testing. The model was evaluated with a confusion matrix, namely accuracy, precision, and F1 score, which each produced an accuracy of 85%, 86%, and 80%. The research is updated on the application of WKNN for meat classification in traditional markets.