Evaluation of Various Error Metrics in K-NN Image Classification: A Case Study on Egg Image Processing
Image processing is a technique to create an image that appears and can be converted into light that describes 2 dimensions. The K-Nearest Neighbor (K-NN) algorithm is known for its efficiency and effectiveness in classification. Although K-NN is often used, a deep understanding of Mean Squared Error (MSE), Mean Absolute Percentage Error (MAPE), and Mean Absolute Deviation (MAD) especially in the context of image classification, still requires further exploration. This study aims to emphasize and measure the behavior of MSE, MAPE, and MAD when applied to K-NN classification results. In this study, calculating statistical features such as mean, standard deviation, skewness, and kurtosis are extracted from the histogram of chicken egg images. These features are then normalized and used as input for the K-NN algorithm. Classification performance is evaluated using MSE, MAPE, and MAD. The results show that K-NN is able to classify chicken egg images with performance measured by MSE of 0.35114462, MAPE of 0.14237803%, and MAD of 0.52930142. The differences in these values, especially the much smaller MAPE value and in percentage units, underscore the importance of selecting the right metrics according to the needs of interpretation and practical applications. This study provides a clearer understanding of how different error metrics characterize the performance of K-NN in image classification, while also highlighting the need for comparative metric considerations in future research.
Authors
- Al-Khowarizmi Al-Khowarizmi (ORCID: https://orcid.org/0000-0002-4401-9999)
- Frainskoy Rio Naibaho (ORCID: https://orcid.org/0000-0002-4470-7556)
Institutions
- Universitas Muhammadiyah Sumatera Utara (ID)
- Institut Für Angewandte Kulturforschung (DE)
Publication Details
- Journal
- CogITo Smart Journal
- Published
- 2025-06-30
- DOI
- https://doi.org/10.31154/cogito.v11i1.859.91-100
- Citations
- 1
- Primary Topic
- Smart Agriculture and AI
- Type
- article
- Field-Weighted Citation Impact
- 1.75