OPEN ACCESS VOL. 7, NO. 1, PP.013-021, NOVEMBER 2024 ISSN : 2622-8106 (ONLINE) DOI: 10.20895/INISTA.V7I1.1615 Journal of Informatics, Information System, Software Engineering and Applications (INISTA) Implementation of The Weighted K-Nearest Neighbors Algorithm in The Classification of Beef and Pork Images Nurdi Afrianto 1 , Irzon Meiditra *2 Information Technology, Mitra Gama Institute of Technology Babussalam,Mandau District, Bengkalis Regency, Riau Indonesia 1 nurdiafrianto1995@gmail.com 2 meiditrairzon@gmail.com Received on 25-09-2024, revised on 18-10-2024, accepted on 24-10-2024 Abstract 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. Keywords: Machine Learning, Pork, Beef, Weighted K-Nearest Neighbors This is an open-access article under the CC BY-SA license. Corresponding Author: * Nurdi Afrianto Faculty of Computer Science and Engineering, Mitra Gama Institute of Technology Babussalam, Mandau District, Bengkalis Regency, Riau, Indonesia Email: nurdiafrianto1995@gmail.com I. INTRODUCTION eef provides a high-quality source of protein and the demand for meat is increasing globally [1]. Because beef is the densest source of protein and contains high levels of iron, vitamin B12, and fatty acids, eating beef raises major health concerns [2]. The demand for meat in developing and developed countries is still very high [3]. In Indonesia, meat is typically sold based on its type, such as chicken, beef, and goat. Pork serves as a source of energy, providing essential macronutrients and micronutrients for human consumption. However, most research observations assess that it affects the risk of cancer [4]. African Swine Fever (ASF), one of the pig illnesses, is extremely contagious and has reached Indonesia [5]. Pork is an important food source that can harbor several pathogens, which are all spread via food. These pathogens include Taenia solium, Trichinella spp., Brucella spp., non-typhoidal Salmonella enterica, E. coli that produces the Shiga toxin, and Campylobacter spp. [6]. Salmonella bacteria are a global health burden. Salmonella bacteria that attack the human intestine are mainly caused by pork [7]. Pork infectious diseases have been reviewed in 57,000 publications that identified more than 40 different pathogens as priority pathogens [8]. In addition, there is the African swine fever virus (ASFV), which causes a very B