JOIV : International Journal on Informatics Visualization
Vol 9, No 4 (2025)

Comparative Analysis of Weighted-KNN, Random Forest, and Support Vector Machine Models for Beef and Pork Image Classification Using Machine Learning

Satria, Budy (Unknown)
Afrianto, Nurdi (Unknown)
Ningsih, Lidya (Unknown)
Sakinah, Putri (Unknown)
Sidauruk, Acihmah (Unknown)
Mayola, Liga (Unknown)



Article Info

Publish Date
31 Jul 2025

Abstract

The actual problem that occurs in the sale of meat by some conventional market traders is mixing beef with pork because of the high selling price. The difference between pork and beef lies in the color and texture of the meat. However, many people do not understand this difference. This study aims to provide a solution to distinguish the two types of beef through a classification process by obtaining the best accuracy using the W-KNN, RF, and SVM models based on machine learning. This study compares the model's performance based on the number of datasets, comprising 400 original images (200 beef and 200 pork images), using a 80:20 ratio for training and test data. The extraction process uses two algorithms: HSV (Hue, Saturation, Value) and RGB (Red, Green, Blue). The model evaluation uses a confusion matrix that includes accuracy, Precision, Recall, and F1-score. Based on the results of the model testing, it was found that the random forest algorithm gave the best overall results, with the highest accuracy of 98.75%, Precision of 97%, F1-score of 98%, and recall of 99% on the number of decision trees of 400. This shows the stability and generalization of the superior model. The random forest algorithm is the most effective for classifying beef and pork data with minimal errors. Implications for further research include using a deep learning approach, especially for image processing, to detect differences in each meat characteristic and increase accuracy.

Copyrights © 2025






Journal Info

Abbrev

joiv

Publisher

Subject

Computer Science & IT

Description

JOIV : International Journal on Informatics Visualization is an international peer-reviewed journal dedicated to interchange for the results of high quality research in all aspect of Computer Science, Computer Engineering, Information Technology and Visualization. The journal publishes state-of-art ...