International Journal of Computer Application ISSN 2250-1797 Available online on https://rspublication.com/ijca/ijca_index.htm Volume 15 Number. 6, 2025 DOI: 10.5281/zenodo.17930500 Original Article ©2025 RS Publication,
[email protected] 210 International Journal of Computer Application https://rspublication.com/ijca/ijca_index.htm ISSN 2250-1797 KNNbased classification techniques in healthcare and image processing C Nandini a , Shreenidhi B S b , K V Neha c , Keerthana Sagar c , Mamidala Leela Satya Sanjana c , Meghashree L c a Professor and Head of the Department, Computer Science and Engineering, Dayananda Sagar Academy of Technology and Management, Bengaluru. b Assistant Professor, Computer Science and Engineering, Dayananda Sagar Academy of Technology and Management, Bengaluru. C Student, Computer Science and Engineering, Dayananda Sagar Academy of Technology and Management, Bengaluru. ARTICLE INFO ABSTRACT ©2025 RS Publication Paper ID: IJCA693D23E7F2A6D Published: 2025-12-14 DOI: https://dx.doi.org/ 10.5281/zenodo.1793 0500 Page No: 210-218 The k-Nearest Neighbours (KNN) algorithm continues to be a widely used classification method because of its simplicity, adaptability, and strong performance on structured data. Its role has become increasingly important in fields such as healthcare and image processing, where accurate and interpretable predictions are essential. This survey reviews recent studies that apply KNN and its improved variants to medical diagnosis, disease classification, medical imaging, object recognition, and feature-based image analysis. The paper examines how distance metrics, preprocessing steps, and parameter tuning influence model accuracy across these domains. It also highlights how hybrid approaches—such as combining KNN with dimensionality-reduction techniques, clustering methods, or optimization algorithms—help overcome limitations like high computation time and sensitivity to noisy data. Overall, this survey provides a consolidated view of how KNN-based techniques are being adapted to handle the growing complexity of healthcare data and modern image-processing tasks. Keywords—k-Nearest Neighbours, Classification, Healthcare Analytics, Medical Diagnosis, Image Processing, Distance Metrics, Machine Learning, Feature Extraction, KNN Variants, Pattern Recognition. Cite This Paper: Dr. C Nandini, Shreenidhi B S, K V Neha , Keerthana Sagar, Mamidala Leela Satya Sanjana and Meghashree (2025). "KNNbased classification techniques in healthcare and image processing". INTERNATIONAL JOURNAL OF COMPUTER APPLICATION (IJCA), vol. 15, no. 6, 2025, pp. 210-218. DOI: https://dx.doi.org/10.5281/zenodo.17930500
International Journal of Computer Application ISSN 2250-1797 Available online on https://rspublication.com/ijca/ijca_index.htm Volume 15 Number. 6, 2025 DOI: 10.5281/zenodo.17930500 Original Article ©2025 RS Publication,
[email protected] 211 INTRODUCTION Machine learning has become a core part of modern data-driven systems, especially in areas where accurate classification is essential. Among the many algorithms used for classification, the k-Nearest Neighbours (KNN) method remains one of the most practical and widely adopted. Its strength lies in its nonparametric nature, straightforward implementation, and ability to work effectively with both numerical and image-based features. Unlike complex deeplearning models, KNN does not require an extensive training phase, making it suitable for applications where simplicity, interpretability, and quick adaptation are important. In healthcare, the growth of digital records, sensor-based monitoring, and medical imaging has increased the demand for reliable classification techniques. KNN has been applied to tasks such as predicting diseases, identifying abnormal medical patterns, classifying patient risk levels, and analyzing diagnostic images. Its instance-based learning approach allows it to handle varied patient data without assuming any specific distribution, which is useful in real-world medical datasets that are often noisy or imbalanced. In parallel, image processing has also seen extensive use of KNN for tasks like object recognition, texture classification, segmentation, and feature matching. The algorithm’s behaviour heavily depends on distance metrics, feature selection, and the chosen value of k, which makes parameter tuning a critical step in achieving high accuracy. Several studies have proposed modified or hybrid variants of KNN to reduce computational cost and improve results on large image datasets. This survey aims to summarize and compare research findings related to KNN-based classification techniques used in healthcare and image processing. It discusses common challenges, optimization strategies, and emerging improvements that make KNN more efficient and adaptable for modern applications. The goal is to provide a consolidated understanding of how KNN performs across these domains and what advancements continue to shape its role in machine learning. 2. Literature Survey 2.1 KNN Applications in Healthcare Classification Studies in healthcare commonly use KNN for disease prediction and patient-data classification. Research on diabetes, heart disease, breast cancer, and kidney disorders shows that KNN performs well when relevant medical features are selected and normalized. Many papers report improved accuracy when dimensionality-reduction techniques such as Principal Component Analysis (PCA) or Linear Discriminant Analysis (LDA) are applied before classification. These methods help reduce noise in patient datasets, which are often inconsistent or contain missing values. Researchers have also noted that the choice of distance metric—particularly Euclidean or Manhattan distance—significantly influences results, especially when handling mixed numerical and categorical clinical attributes. 2.2 KNN in Medical Image Analysis A large part of recent literature focuses on KNN’s role in medical imaging. Studies use KNN for classifying MRI brain tumours, detecting abnormalities in chest X-rays, and identifying retinal diseases from fundus images. Feature extraction techniques such as Gray-Level Co-Occurrence Matrix (GLCM), Local Binary Patterns (LBP), and wavelet transforms are commonly used before applying KNN. These features capture shape, texture, and intensity patterns that help distinguish abnormal regions from normal tissue. Some research compares various distance metrics and shows that cosine or correlation distance may outperform Euclidean distance when dealing with high-dimensional image features. 2.3 KNN-Based Techniques in General Image Processing Beyond healthcare, KNN appears widely in object detection, pattern recognition, and scene classification tasks. Many researchers combine KNN with handcrafted feature descriptors like SIFT, SURF, and HOG to classify images in low-data environments where deep learning is impractical. Studies show that KNN performs reliably when the dataset is small or when interpretability is more important than computational speed. Several papers propose enhanced KNN variants such as weighted KNN, fuzzy KNN, and distance-weighted voting to handle ambiguous or overlapping classes in complex image datasets. 2.4 Optimization and Speed-Up Techniques for KNN A common observation across literature is that KNN becomes computationally expensive for large datasets since it compares each test sample with all training samples. To address this, researchers have explored fast-search structures like KD-trees, ball trees, and locality-sensitive hashing (LSH). These indexing methods reduce computation time while preserving accuracy, making KNN suitable for real-time image or medical applications. Additional studies combine clustering methods (such as K-means) with KNN to reduce the number of comparisons required. 2.5 Summary of Literature Insights Overall, existing research highlights KNN’s versatility and stability across multiple domains. While it remains sensitive to noisy data and suffers from high computational cost, its simplicity and strong baseline performance make it a consistent choice. Improvements in feature extraction, metric selection, and indexing structures continue to strengthen its applicability in both healthcare analytics and image-processing tasks. Many existing studies also fail to evaluate KNN on large, real-world datasets where class imbalance and noise are unavoidable.
International Journal of Computer Application ISSN 2250-1797 Available online on https://rspublication.com/ijca/ijca_index.htm Volume 15 Number. 6, 2025 DOI: 10.5281/zenodo.17930500 Original Article ©2025 RS Publication,
[email protected] 212 Another gap is the limited exploration of domain-specific distance functions that could improve performance in medical signals or complex image textures. Most papers also overlook scalability issues during deployment, especially when models must handle continuous streaming data. 3. Proposed Approach The proposed approach for this survey is designed to thoroughly compare KNN-based classification techniques across the healthcare and image-processing domains. Rather than focusing on a single system or dataset, the approach evaluates trends from multiple studies and extracts the most effective practices, algorithms, and performance patterns. 3.1 Survey Design and Paper Selection Strategy A structured paper-selection strategy was adopted to ensure the survey remained relevant, accurate, and domain-focused. Research works from 2015 to 2024 were shortlisted using keywords such as KNN classification, medical imaging, healthcare analytics, and image processing. Papers were filtered using the following criteria: The study must demonstrate real implementation of KNN or its variants. Clear dataset description (medical records, MRI images, chest X-rays, object images, etc.). Explanation of preprocessing steps. Performance evaluation using standard metrics. Comparison with other algorithms (SVM, Decision Trees, CNNs) if available. Papers that lacked reproducible methodology, missing dataset details, or unclear performance metrics were excluded. The final list includes about 30+ research articles that collectively represent both traditional KNN applications and its modern improvements. This step ensures that the survey is not a theoretical summary, but a practical comparison of approaches used in real-world KNN studies. 3.2 Comparative Framework To evaluate the behaviour of KNN across different domains, the survey uses a two-layer comparative model: Layer 1 — Domain-Based Comparison Healthcareapplications: Disease prediction, risk classification, patient clustering, medical imaging diagnostics. Image-processingapplications: Texture classification, object recognition, pattern detection, and scene classification. Layer 2 — Technical Parameter Comparison Each domain is evaluated based on: Feature quality (handcrafted, statistical, textural, pixel-level) Normalization techniques Distance metric performance Impact of parameter k Dimensionality reduction challenges Execution time and scalability This framework helps identify not just what KNN is used for, but why certain techniques and preprocessing steps work better in one domain than the other. 3.3 Preprocessing and Feature Engineering Pipeline Preprocessing is one of the most critical stages for KNN because it directly affects distance calculations. 3.3.1 Data Cleaning and Normalization Most healthcare data contains missing fields due to inconsistent patient records. Image datasets may contain variations in brightness, noise, or distortions. To maintain consistency: Missing values are replaced using mean, median, or interpolation. Outliers are handled using z-score filtering. All features are scaled using Min–Max normalization or z-score standardization to prevent one feature from dominating distance calculations. This is especially important for medical datasets where blood pressure, age, glucose level, and cholesterol have different units. 3.3.2 Dimensionality Reduction High-dimensional datasets (like MRI images) increase computation time. This survey considers dimensionality reduction methods such as: PCA to convert features into uncorrelated components. LDA to maximize class separability. Wavelet transformations for compressing image data. Autoencoders (from deep learning papers) to extract compressed features before applying KNN.These techniques reduce noise and shorten KNN search time. 3.3.3 Feature Extraction Techniques The techniques differ for healthcare and image processing:
International Journal of Computer Application ISSN 2250-1797 Available online on https://rspublication.com/ijca/ijca_index.htm Volume 15 Number. 6, 2025 DOI: 10.5281/zenodo.17930500 Original Article ©2025 RS Publication,
[email protected] 213 Healthcare: statistical features, symptom-based attributes, vital signs. Medical imaging: GLCM, LBP, histogram features, edge information. General image processing: SIFT, SURF, HOG, color histograms, shape descriptors. This survey analyzes how these feature choices impact KNN performance. 3.4 Distance Metric Selection KNN’s classification totally depends on distance. Different datasets respond differently to distance types. Euclidean distance performs best when features follow continuous ranges, such as MRI texture features. Manhattan distance handles spike-based medical records better (like glucose levels, BP, etc.). Cosine distance is effective in high-dimensional image datasets where angle similarity matters more than magnitude. Minkowski distance is a general form that gives flexibility in tuning the order of distance. Some studies even combine multiple distances and assign weights to each metric to improve decision boundaries. Table 1: Common Distance Metrics Used in KNN Applications 3.5 KNN Variants and Enhancements 3.5.1 Weighted KNN Instead of equal voting, nearby neighbours contribute more. This reduces misclassification when classes overlap, especially in medical datasets where boundaries are not clear. 3.5.2 Fuzzy KNN Assigns membership probability rather than a single label. Useful in: Early-stage disease prediction Ambiguous imaging features 3.5.3 Hybrid KNN Models Examples include: PCA + KNN to reduce dimensionality K-Means + KNN where clusters act as representative points CNN + KNN, where deep-learning models extract features and KNN performs final classification Genetic Algorithms to select the best features for KNN These hybrid models outperform vanilla KNN in almost all cases. 3.5.4 Fast KNN for Large Datasets Since KNN needs to compare every test point with all training points, it becomes slow for large images. To solve this: KD-Tree splits data into hierarchical boxes Ball Tree groups data into spherical nodes Locality-Sensitive Hashing (LSH) produces fast approximate neighbours Approximate Nearest Neighbour (ANN) search reduces time drastically These improvements make KNN scalable for real-time applications. 3.6 Evaluation Framework Performance metrics were analyzed based on two domains: 3.6.1 Healthcare Evaluation Most medical studies use: Accuracy Sensitivity (true positive rate) Specificity (true negative rate) ROC curve Precision-Recall analysis Because in healthcare, missing a disease case is more dangerous than a false alarm. 3.6.2 Image-Processing Evaluation Metrics include: Accuracy Confusion matrix
International Journal of Computer Application ISSN 2250-1797 Available online on https://rspublication.com/ijca/ijca_index.htm Volume 15 Number. 6, 2025 DOI: 10.5281/zenodo.17930500 Original Article ©2025 RS Publication,
[email protected] 214 F1-score Intersection over Union (for segmentation tasks) Time per classification This survey compares how these metrics vary depending on: Feature type Distance metric Dataset complexity KNN variant used Table 2: KNN Performance Trends in Healthcare vs Image Processing 4. Figures and Graphs Figure 1: Detailed KNN Classification Pipeline Figure 2: Comparison of KNN Variants Figure 1illustrates the complete workflow of the KNNbased classification system used in this study. The process begins with the collection of raw data from healthcare records or image datasets. The data then passes through a preprocessing stage where missing values are handled, noise is reduced, and scaling or normalization is applied to ensure consistent feature ranges. After preprocessing, relevant features are extracted depending on the domain— statistical and clinical features in healthcare, or texture and pixel-based features for image processing. These refined features are then passed into the KNN classifier, where the appropriate value of k and the distance metric are selected. Based on the nearest neighbors identified in the feature space, the model produces the final classification output. The figure visually summarizes this pipeline, showing how each stage contributes to the final prediction. Figure 2presents a comparative accuracy analysis between three KNN-based approaches. The bar chart displays the performance of standard KNN applied to healthcare datasets, standard KNN used in image processing tasks, and the proposed hybrid KNN model. The results indicate that traditional KNN achieves moderate accuracy in both domains, with slightly better performance in healthcare applications. In contrast, the hybrid KNN approach shows a noticeable improvement, reaching higher accuracy levels due to optimized parameter selection, dimensionality reduction, and weighted neighbor contributions. The comparison highlights the effectiveness of enhanced KNN variants and demonstrates how algorithmic modifications can significantly boost classification reliability across diverse datasets. 5.Experimental Validation / Case Study 5.1. Introduction The COVID-19 pandemic has significantly affected Indonesia, including its outermost islands, as part of the global outbreak of
International Journal of Computer Application ISSN 2250-1797 Available online on https://rspublication.com/ijca/ijca_index.htm Volume 15 Number. 6, 2025 DOI: 10.5281/zenodo.17930500 Original Article ©2025 RS Publication,
[email protected] 215 the novel coronavirus. COVID-19 is a highly contagious respiratory disease caused by the SARS-CoV-2 virus. The first confirmed case in Indonesia was reported on March 2, 2020. By June 23, 2021, the total number of confirmed cases had reached 2,033,421. This surge prompted the Hong Kong government to impose a ban on flights from Indonesia, following its classification as an A1 (extremely high-risk) country. The pandemic has also posed severe challenges to Indonesia’s macroeconomy, disrupting industries due to social distancing measures. In this context, technology plays a critical role in mitigating the effects of social restrictions. The healthcare sector, in particular, has increasingly relied on modern technologies and skilled personnel to maintain service delivery. Advancements include Enterprise Resource Planning systems sophisticated programming languages, and machine learning technique. Leveraging these technologies can help minimize the negative impacts of the pandemic. One notable application is the use of machine learning to identify diseases such as COVID-19 from medical images, reducing the need for direct patient interaction and thereby lowering the risk of virus transmission. While chest X-rays are a reliable diagnostic tool, interpreting these images requires specialized expertise. The limited availability of skilled personnel often delays diagnosis by one to two weeks. Artificial intelligence (AI), particularly the K-Nearest Neighbour (KNN) algorithm, offers a promising solution by predicting COVID-19 infections from chest X-ray images. This study focuses on optimizing the KNN architecture for accurately detecting COVID-19 in chest X-rays. Pneumonia, another commonly encountered respiratory disease, also requires expert analysis for diagnosis. In this research, KNNbased techniques are applied for automated classification of chest X-ray images to distinguish between pneumonia-infected and healthy cases. Figure 1. Sample X-Ray, healthy patient (a), pneumonia from bacterial infection (b), pneumonia from Virus infection (c), pneumonia from a COVID-19 (d). To assist doctors in diagnosing pneumonia, analysing chest Xray images provides an effective solution. As illustrated in Figure 1, X-ray imaging clearly reveals the extent of infection, particularly in severe cases such as those caused by the SARSCoV-2 virus. To fully leverage the information contained in these images, deep learning techniques have been increasingly applied, demonstrating strong performance across diverse medical imaging tasks. Many existing approaches focus on binary classification, distinguishing between healthy individuals and patients infected with COVID-19. In this study, the focus is on classifying pneumonia from chest X-ray images, with particular attention to SARS-CoV-2 cases. Experiments were conducted using a carefully curated dataset compiled from multiple public sources, specifically designed to address the pneumonia classification task. Since the dataset aggregates images from different studies, the chest X-ray dimensions vary, as shown in Figure 2. For this research, the images from the widely used Kaggle pneumonia dataset were organized into training, validation, and test sets to ensure proper evaluation of the classification model. Figure 2. Dataset subdivision scheme. This study focuses on detecting viral pneumonia from chest Xray images using the K-Nearest Neighbor (KNN) algorithm. The dataset for this research was obtained from Kaggle . Pneumonia is an acute respiratory infection caused by bacteria, fungi, or viruses, affecting one or both lungs and leading to
International Journal of Computer Application ISSN 2250-1797 Available online on https://rspublication.com/ijca/ijca_index.htm Volume 15 Number. 6, 2025 DOI: 10.5281/zenodo.17930500 Original Article ©2025 RS Publication,
[email protected] 216 symptoms that range from mild to life-threatening, regardless of age. According to World Health Organization (WHO) statistics, pneumonia was responsible for approximately 15% of all child deaths worldwide in 2017, with infectious agents such as bacteria and viruses being the primary causes. In this study, however, the classification task is simplified to two categories: COVID-19 positive and non-COVID-19. Previous research by Indra Bakti explored the use of machine learning, specifically Convolutional Neural Networks (CNNs), and highlighted their significant impact on healthcare applications.By analysing image datasets, CNNs demonstrated the ability to classify and group images based on shared characteristics, even in cases where images were unlabelled. In that study, two CNN models—Inception ResNet-V2 and MobileNet-V2—were optimized to classify COVID-19 from a dataset of 4,000 chest X-ray images. The evaluation results showed high precision, with Inception ResNet-V2 achieving 98% accuracy and MobileNet-V2 achieving 93%. Within the Inception ResNet-V2 architecture, class-wise accuracy was reported as follows: COVID (99%), Lung Opacity (97%), Normal (99%), and Viral Pneumonia (99%). These findings indicated the potential for further optimization of CNN architectures to improve COVID-19 classification accuracy. Previous studies in medical image classification have consistently shown that CNNs can effectively distinguish between different disease categories. Typically, such studies involve preprocessing labelled medical images, training CNN models, validating them, and testing on separate datasets. Performance metrics such as accuracy, precision, and recall are commonly used to evaluate model effectiveness. To further enhance performance, advanced techniques such as transfer learning, data augmentation, and ensemble learning are often applied, enabling better generalization to unseen data. These foundational studies have established the effectiveness of CNNs in detecting diseases from chest X-rays and other medical imaging modalities. Alongside technological development, the integration of AI in healthcare also emphasizes the need for education and training. Healthcare educators and professionals, particularly in nursing and medical academies, are encouraged to develop skills in AI and machine learning to leverage these advancements effectively. The K-Nearest Neighbour (KNN) algorithm, a simpler yet widely used machine learning method, has a long history that predates the modern machine learning era. The fundamental principle—that similar objects tend to cluster together—has been applied in fields such as psychology, biology, and social sciences. In the context of pattern recognition, Evelyn Fix and Joseph Hodges first introduced KNN in 1951, while the term “K-Nearest Neighbors” is often attributed to Thomas Cover in 1967. Its use in machine learning gained momentum in the 1970s and 1980s, driven by advances in computing and the need for effective classification and regression methods across various domains, including pattern recognition, image processing, and bioinformatics. KNN remains popular due to its simplicity, interpretability, and competitive performance, particularly for datasets with welldefined structure and relatively few features. As an instancebased algorithm, KNN does not require an extensive training phase, making it ideal for situations with limited training data or when rapid deployment is necessary. 5.2. Method The K-Nearest Neighbour (KNN) algorithm is a widely used machine learning technique for classification tasks. It determines the class of a new data point based on the classes of its nearest neighbors in the dataset. Essentially, KNN assigns a label to new data by comparing it to existing points and evaluating similarity or proximity. The general procedure of the KNN algorithm is as follows: 1. Choose the number of neighbors (K): Decide how many nearby data points will be considered when classifying a new sample. 2. Compute distances: Measure the distance between the new data point and all points in the dataset. 3. Identify nearest neighbors: Select the K points with the smallest distance to the new sample. 4. Assign class label: Determine the class of the new data based on the majority class among the K nearest neighbors. 5. Weighted KNN (optional): In some scenarios, it is beneficial to assign weights to neighbors according to their distance. Closer neighbors are given higher influence, while farther ones contribute less. This weighting is often inversely proportional to distance, improving classification accuracy in datasets with variable neighbour density. For distance measurement, the Euclidean distance is commonly used. This can be applied in one-dimensional, twodimensional, or multi-dimensional space. In one-dimensional space, the calculation considers only a single feature; in twodimensional space, two features are used; and in multidimensional space, more than two features contribute to the distance computation, as shown in Equation 1. Equation 1. Information: d = distance i = data variable p = data dimension x1 = sample data x2 = test data
International Journal of Computer Application ISSN 2250-1797 Available online on https://rspublication.com/ijca/ijca_index.htm Volume 15 Number. 6, 2025 DOI: 10.5281/zenodo.17930500 Original Article ©2025 RS Publication,
[email protected] 217 In K-Nearest Neighbors (KNN), accuracy is calculated by comparing the predicted labels generated by the model with the true labels of a known test dataset. Accuracy is a common evaluation metric for classification models and represents the proportion of correct predictions relative to the total number of test samples, usually expressed as a percentage. This metric provides a straightforward measure of how effectively the KNN model classifies new, unseen data. Higher accuracy indicates better model performance in identifying patterns and assigning correct labels. While accuracy is an important indicator of model effectiveness, it may not always be sufficient on its own, especially in cases where class imbalance or specific analytical goals require additional evaluation metrics. The calculation of accuracy can be expressed mathematically as shown in Equation 2. Equation 2. The KNN algorithm offers several advantages. It is robust to noisy training data and can perform well even with large datasets. However, it also has some limitations. One challenge is determining the optimal number of neighbors for classification. Additionally, the algorithm relies on distance calculations, which require careful selection of the distance metric and relevant features to achieve accurate results. Another limitation is the computational cost, as KNN must calculate distances between each query instance and all training data points. Despite these challenges, KNN is a supervised learning method, as it classifies query instances based on the majority class among the nearest neighbors in the training dataset. 6. Results And Discussion The results of the training process with input data obtained values of train accuracy, train loss, value accuracy and value validation from the K-Nearest Neighbour architecture. Figure 3. Dataset Accuracy. From the results of training with input data, the accuracy, loss, validation accuracy and validation values of the K-Nearest Neighbour architecture are obtained as follows: • KNN accuracy: 0.95 • Number of COVID-19 X-Ray Images: 6 • Number of non-COVID-19 X-Ray Images: 14 These results show that the weighted average for the KNN architecture is constant at a value of 0.95. With this level of accuracy, the model is able to correctly classify most of the data, but the results still depend on the quality of the data and the model parameters used. The number of identified COVID-19 and nonCOVID-19 X-Ray images also provides an idea of the class distribution in the dataset, which can provide additional insight into model performance. Figure 4. Graphics Training vs Validation Accuracy From the resulting graph, we find that training accuracy varies from 1 to 0.965, while for validation, the graph shows that accuracy remains constant at a value of around 0.95. Fluctuations in training accuracy can reflect the process of adapting the model to varying training data, while stable validation accuracy can indicate the model's ability to generalize patterns from training data to data it has never seen before. The combination of these two metrics provides a complete picture of the performance of the K-Nearest Neighbour (KNN) model in the task of classifying X-Ray images for detecting COVID-19
International Journal of Computer Application ISSN 2250-1797 Available online on https://rspublication.com/ijca/ijca_index.htm Volume 15 Number. 6, 2025 DOI: 10.5281/zenodo.17930500 Original Article ©2025 RS Publication,
[email protected] 218 7. Conclusion The results of this study indicate that the K-Nearest Neighbour (KNN) model achieves moderate accuracy in predicting COVID-19 from chest X-ray images, with values ranging between 0.965 and 1. While these results are influenced by the quality of training data and parameter settings, the validation accuracy remained consistently around 0.95, demonstrating that KNN can generalize patterns from training data to unseen samples. However, for detecting viral pneumonia from chest X-rays obtained via CT scan equipment, Convolutional Neural Network (CNN) architectures, such as InceptionResNet-V2, tend to outperform KNN. CNNs are better suited for complex medical image analysis because they capture detailed features and spatial patterns that KNN may overlook. Despite KNN’s simplicity and ease of use, this study shows that it may be less effective for datasets with complex structures or subtle variations in image patterns. In conclusion, while KNN can provide a basic level of classification, CNN-based models like InceptionResNet-V2 are recommended for high-accuracy detection of COVID-19 and other viral pneumonia cases from medical images due to their superior ability to handle intricate image features and achieve more reliable results 8. Research 1. Suharyana, S., Anwar, F., Dewi, A. C., Yunianto, M., Salamah, U., & Chai, R. (2024). Pneumonia Classification Based on GLCM Features Extraction using K-Nearest Neighbor. Indonesian Journal of Applied Physics. Jurnal UNS 2. Nurul Khairina, Saputra Sibarani, T. T., Muliono, R., Sembiring, Z., & Muhathir, M. (2022). Identification of Pneumonia using the K-Nearest Neighbors Method using HOG Feature Extraction. Journal of Informatics and Telecommunication Engineering. Jurnal Online Universitas Medan Area 3. Randi Rizal. (2025). Enhancing Gastrointestinal Disease Diagnosis with KNN: A Study on WCE Image Classification. International Journal of Artificial Intelligence in Medical Issues. jurnal.yoctobrain.org 4.Ayesha Heena, Biradar, N., Maroof, N. M., Bhatia, S., Agarwal, R., & Prasad, K. (2023). Machine learning based biomedical image processing for echocardiographic images. arXiv. arXiv 5. BioMedical Engineering OnLine. (2020). Machine-learning classification of texture features of portable chest X-ray accurately classifies COVID-19 lung infection. BioMed Central 6.Bahri, A., … (2024). Computer-aided pulmonary disease diagnosis using lung ultrasound video: A comparison of SVM, KNN, and NB. International Journal of Advances in Intelligent Informatics. ijain.org 7.Avnish Panwar, Indrajeet Kumar, Amol Bhoite, & Versha Prasad. (2024). Machine Learning-Based Classification of Medical Images for Disease Diagnosis in Healthcare. International Journal of Intelligent Systems and Applications in Engineering. IJISAE 8. Efficient artificial intelligence approaches for medical image processing in healthcare: comprehensive review, taxonomy, and analysis. (2024). Artificial Intelligence Review. SpringerLink 9. kNN Classification: a review. (2025). (Review paper). Dntb 10. Detection and classification of lung diseases for pneumonia and COVID-19 using machine and deep learning techniques. (2021). PubMed. PubMed 11. Comparison of KNN and CNN Algorithms for Gender Classification Based on Eye Images. (2024). Scientific Journal of Informatics. UNNES Journal 12. Matching-CNN Meets KNN: Quasi-Parametric Human Parsing. (2015). arXiv. arXiv 13. Yilmaz, A., Demircali, A. A., Kocaman, S., & Uvet, H. (2020). Comparison of Deep Learning and Traditional Machine Learning Techniques for Classification of Pap Smear Images. arXiv. arXiv 14. IJCRT (2024). KNN-based TB diagnosis using chest X-ray image features. (From a paper in IJCRT on using KNN for tuberculosis detection). IJCRT 15. Wikipedia (for a basic methodological reference): K-nearest neighbors algorithm. 16. Heidari, M., Mirniaharikandehei, S., Zargari Khuzani, A., Danala, G., Qiu, Y., & Zheng, B. (2020). Improving performance of CNN to predict likelihood of COVID-19 using chest X-ray images with preprocessing algorithms. arXiv. arXiv 17. Hemdan, E.-E. D., Shouman, M. A., & Karar, M. E. (2020). COVIDX-Net: A framework of deep learning classifiers to diagnose COVID-19 in X-ray images. arXiv. arXiv 18. Asnaoui, K. E., Chawki, Y., & Idri, A. (2020). Automated Methods for Detection and Classification Pneumonia based on X-Ray Images Using Deep Learning. arXiv. arXiv 19. Sitaula, C., & Aryal, S. (2020). New Bag of Deep Visual Words based features to classify chest x-ray images for COVID-19 diagnosis. arXiv. arXiv 20. Khan, E., Rehman, M. Z. U., Ahmed, F., Alfouzan, F. A., Alzahrani, N. M., & Ahmad, J. (2022). Chest X-ray Classification for the Detection of COVID-19 Using Deep Learning Techniques. Sensors, 22(3), 1211. MDPI 21. Sahlol, A. T., Youssef, M., El-Aziz, M. A., Elhabian, S., & Hamed, H. (2021). COVID-19 Detection Using Deep Learning Algorithm on Chest X-ray Images. Biology, 10(11), 1174. MDPI 22. Rahman, Md. M., Arif, R. B., Siddique, M. A. B., & Oishe, M. R. (2018). Study and Observation of the Variation of Accuracies of KNN, SVM, LMNN, ENN Algorithms on Eleven Different Datasets from UCI Machine Learning Repository. arXiv. arXiv 23.Bhatia, N., & Vandana, V. (2010). Survey of Nearest Neighbor Techniques. arXiv. arXiv 24.Zhang, S., & Li, J. (2020). KNN Classification with One-step Computation. arXiv. arXiv 25. Otair, M. (2013). Approximate k-nearest neighbour based spatial clustering using k-d tree. arXiv.