Penerapan algoritma K-Nearest Neighbors (KNN) untuk klasifikasi citra medis
DOI:
https://doi.org/10.24246/itexplore.v4i1.2025.pp33-43Keywords:
algoritma, citra medis, klasifikasi, K-Nearest Neighbors, reduksi dimensiAbstract
This study aims to optimize the implementation of the K-Nearest Neighbors (K-NN) algorithm for medical image classification by focusing on selecting the optimal KKK parameter and applying dimensionality reduction techniques to improve accuracy and efficiency. The data used was sourced from public medical image repositories such as The Cancer Imaging Archive (TCIA) and Medical Image Analysis datasets, covering various diseases, including brain tumors, lung cancer, and kidney lesions. The research process involves data collection, data preprocessing, dimensionality reduction using Principal Component Analysis (PCA), applying the K-NN algorithm with Euclidean, Minkowski, and Cosine distance metrics, and performance evaluation using accuracy, precision, recall, and F1-score. Experimental results demonstrate that K=5with the Euclidean distance metric provides the best performance, achieving an accuracy of 90%. Additionally, PCA effectively reduces computational time by 30% without significantly compromising accuracy. This study proves that K-NN is an effective method for medical image classification. However, further research is needed to integrate K-NN with deep learning models to enhance performance and feature extraction capabilities.
Downloads
References
Y. Dang, N. Jiang, H. Hu, Z. Ji, and W. Zhang, “Image classification based on quantum K-Nearest-Neighbor algorithm,” Quantum Inf. Process., vol. 17, no. 9, p. 239, 2018, doi: 10.1007/s11128-018-2004-9.
C. Chen, K. Chernoff, G. Karemore, P. Lo, M. Nielsen, and F. Lauze, “Classification in medical images using adaptive metric k-NN,” in Proc.SPIE, Mar. 2010, p. 76230S. doi: 10.1117/12.844338.
L.-Y. Hu, M.-W. Huang, S.-W. Ke, and C.-F. Tsai, “The distance function effect on k-nearest neighbor classification for medical datasets,” Springerplus, vol. 5, no. 1, p. 1304, 2016, doi: 10.1186/s40064-016-2941-7.
R. H. Ramdlon, E. M. Kusumaningtyas, and T. Karlita, “Brain Tumor Classification Using MRI Images with K-Nearest Neighbor Method,” in 2019 International Electronics Symposium (IES), 2019, pp. 660–667. doi: 10.1109/ELECSYM.2019.8901560.
G. Florimbi et al., “Accelerating the K-Nearest neighbors filtering algorithm to optimize the real-time classification of human brain tumor in hyperspectral images,” Sensors (Switzerland), vol. 18, no. 7, 2018, doi: 10.3390/s18072314.
P. Thamilselvan and J. G. R. Sathiaseelan, “Detection and classification of lung cancer MRI images by using enhanced k nearest neighbor algorithm,” Indian J. Sci. Technol., vol. 9, no. 43, 2016, doi: 10.17485/ijst/2016/v9i43/104642.
W. Lumchanow and S. Udomsiri, “Image classification of malaria using hybrid algorithms: Convolutional neural network and method to find appropriate K for K-Nearest neighbor,” Indones. J. Electr. Eng. Comput. Sci., vol. 16, no. 1, pp. 382–388, 2019, doi: 10.11591/ijeecs.v16.i1.pp382-388.
M. Jia, B.-C. Chen, Z. Wu, C. Cardie, S. Belongie, and S.-N. Lim, “Rethinking nearest neighbors for visual classification,” arXiv Prepr. arXiv2112.08459, 2021, doi: 10.48550/arXiv.2112.08459.
T. Peng, M. Boxberg, W. Weichert, N. Navab, and C. Marr, “Multi-task Learning of a Deep K-Nearest Neighbour Network for Histopathological Image Classification and Retrieval BT - Medical Image Computing and Computer Assisted Intervention – MICCAI 2019,” D. Shen, T. Liu, T. M. Peters, L. H. Staib, C. Essert, S. Zhou, P.-T. Yap, and A. Khan, Eds., Cham: Springer International Publishing, 2019, pp. 676–684. doi: 10.1007/978-3-030-32239-7_75.
L. Xiong and Y. Yao, “Study on an adaptive thermal comfort model with K-nearest-neighbors (KNN) algorithm,” Build. Environ., vol. 202, p. 108026, 2021, doi: 10.1016/j.buildenv.2021.108026.
E. Avuçlu, “Performance analysis of classification between a particular number and average using the same distance measurements,” Multimed. Tools Appl., vol. 83, no. 38, pp. 86121–86139, 2024, doi: 10.1007/s11042-024-20334-4.
D. Chen, Ruolin, and H. Du, “A fast incomplete data classification method based on representative points and K-nearest neighbors,” 2022 IEEE Conf. Telecommun. Opt. Comput. Sci., pp. 423–428, 2022, doi: 10.1109/TOCS56154.2022.10016185.
A. K. Budati and R. B. Katta, “An automated brain tumor detection and classification from MRI images using machine learning techniques with IoT,” Environ. Dev. Sustain., vol. 24, no. 9, pp. 10570–10584, 2022, doi: 10.1007/s10668-021-01861-8.
N.-R. Zhou, X.-X. Liu, Y.-L. Chen, and N.-S. Du, “Quantum K-Nearest-Neighbor Image Classification Algorithm Based on K-L Transform,” Int. J. Theor. Phys., vol. 60, no. 3, pp. 1209–1224, 2021, doi: 10.1007/s10773-021-04747-7.
V. Kalra, I. Kashyap, and H. Kaur, “Effect of Ensembling over K-fold Cross-Validation with Weighted K-Nearest Neighbour for Classification in Medical Domain,” in 2022 International Conference on Machine Learning, Big Data, Cloud and Parallel Computing (COM-IT-CON), 2022, pp. 796–800. doi: 10.1109/COM-IT-CON54601.2022.9850498.
R. T. Prasetio, “Genetic Algorithm to Optimize k-Nearest Neighbor Parameter for Benchmarked Medical Datasets Classification,” J. Online Inform., pp. 153–160, 2020, doi: 10.15575/join.v5i2.656.
J. Zhuang, J. Cai, R. Wang, J. Zhang, and W.-S. Zheng, “Deep kNN for Medical Image Classification BT - Medical Image Computing and Computer Assisted Intervention – MICCAI 2020,” A. L. Martel, P. Abolmaesumi, D. Stoyanov, D. Mateus, M. A. Zuluaga, S. K. Zhou, D. Racoceanu, and L. Joskowicz, Eds., Cham: Springer International Publishing, 2020, pp. 127–136. doi: 10.1007/978-3-030-59710-8_13.
R. Sasikala, Dr. S. P. Swornambiga, “Novel K-Nearest Neighbor With Convolutional Neural Networks (KNN-CNN) For Accurate Brain Tumor Detection In Image Mining,” Tuijin Jishu/Journal Propuls. Technol., vol. 44, no. 4, pp. 2090–2099, 2023, doi: 10.52783/tjjpt.v44.i4.1184.
V. Chen, M. R. Taesiri, and A. Totti Nguyen, “PCNN: Probable-Class Nearest-Neighbor Explanations Improve Fine-Grained Image Classification Accuracy for AIs and Humans,” arXiv e-prints, p. arXiv-2308, 2023, doi: 10.48550/arXiv.2308.13651.
R.-C. Chen, C. Dewi, S.-W. Huang, and R. E. Caraka, “Selecting critical features for data classification based on machine learning methods,” J. Big Data, vol. 7, no. 1, p. 52, 2020, doi: 10.1186/s40537-020-00327-4.
S. Uddin, I. Haque, H. Lu, M. A. Moni, and E. Gide, “Comparative performance analysis of K-nearest neighbour (KNN) algorithm and its different variants for disease prediction,” Sci. Rep., vol. 12, no. 1, p. 6256, 2022, doi: 10.1038/s41598-022-10358-x.
Downloads
Published
How to Cite
Issue
Section
License

All articles published in IT-Explore: Jurnal Penerapan Teknologi Informasi dan Komunikasi is licensed under a Creative Commons Attribution 4.0 International License.




