A Russell-Rao Similarity-Based K-Nearest Neighbor Approach for Categorical Data Classification
DOI:
https://doi.org/10.33411/IJIST/1949Keywords:
Machine Learning, K-Nearest Neighbors, Classification, Goodall-KNN, Gower-KNN, Russell-Rao-KNN, Categorical Data, Similarity MeasuresAbstract
Machine learning has become a main tool for solving classification problems across several application domains combining vast learning strategies to uncover patterns and produce accurate predictions from the complicated datasets. While many classification techniques have been developed for numerical data comparatively less studies have focused on improving similarity-based methods for the categorical datasets. This research proposes and evaluates three K Nearest Neighbor (KNN) variants developed on the Goodall Gower and Russell Rao similarity measures for categorical data classification. The effectiveness of the built-in models was tested on the Malware Detection Car Evaluation and Mushroom datasets using accuracy precision recall and F1 score. Russell Rao KNN (RRKNN) produced the strongest overall performance obtaining an average accuracy of 90.30% average precision of 90.79% average recall of 90.30% and average F1 score of 90.19%. Goodall KNN (GDKNN) achieved an average accuracy of 77.86% precision of 76.16% recall of 77.86%, and F1 score of 75.53% while Gower KNN (GRKNN) obtained an average accuracy of 76.90% precision of 72.98% recall of 78.52% and F1 score of 75.56%. Across the three datasets RRKNN's accuracy advantage over GDKNN and GRKNN ranged from approximately 0.3 to 39.9 percentage points with the largest gap observed on the Car Evaluation dataset (88.72% vs 57.22% and 48.84%) and the smallest on the Mushroom dataset, where RRKNN and GRKNN differed by only 0.31 points (84.86% vs 84.55%) RRKNN and GRKNN also bounded exactly on Malware Detection (97.33% each).Given the time and resource constraints of this revision, we did not perform a repeated-run statistical significance test. Nevertheless, the observed performance gaps suggest that the difference on the Car Evaluation dataset is unlikely to be explained solely by train-test split variability. In contrast, the differences between RRKNN and GRKNN on the Mushroom and Malware Detection datasets are sufficiently small that the two methods should be considered practically comparable. These results show that Russell Rao KNN consistently matched or outperformed the other two variants across the selected evaluation metrics reflecting its stability and effectiveness for categorical data classification. Overall, the study offers practical guidance for selecting a suitable similarity-based KNN model for data-driven categorical classification tasks and discusses the computational tradeoffs and limitations relevant to real-world deployment.
References
S. Boriah, V. Chandola, and V. Kumar, “Similarity measures for categorical data: A comparative evaluation,” Soc. Ind. Appl. Math. - 8th SIAM Int. Conf. Data Min. 2008, Proc. Appl. Math. 130, vol. 1, pp. 243–254, 2008, doi: 10.1137/1.9781611972788.22.
A. B. R. S. C. Levy, “A guide to similarity measures and their data science applications,” Publ. by Springer, 2025, doi: DOI:10.1186/s40537-025-01227-1.
Ali A. Amer, Sri Devi Ravana & Riyaz Ahamed Ariyaluran Habeeb, “Effective k-nearest neighbor models for data classification enhancement,” J. Big Data, vol. 12, no. 86, 2025, [Online]. Available: https://link.springer.com/article/10.1186/s40537-025-01137-2
Onder Coban., “"An up-to-date comparative analysis of the KNN classifier distance metrics for text categorization,” DATA Sci. Inf., vol. 3, 2023, [Online]. Available: https://scispace.com/pdf/an-up-to-date-comparative-analysis-of-the-knn-classifier-47zrby3k3r.pdf
C. Supriyanto, F. A. Rafrastara, A. Amiral, S. R. Amalia, M. D. Al Fahreza, and M. F. Abdollah, “Malware Detection Using K-Nearest Neighbor Algorithm and Feature Selection,” J. MEDIA Inform. BUDIDARMA, vol. 8, no. 1, p. 412, Jan. 2024, doi: 10.30865/MIB.V8I1.6970.
Kashif Bashir, Jaime Lloret, “Detection of Android Malware in the Internet of Things through the K-Nearest Neighbor Algorithm,” Sensors, vol. 23, p. 7256, 2023, doi: https://doi.org/10.3390/s23167256.
S. Jan, M. M. Khan, J. Uddin, B. A. Hassan, and A. U. Rahman, “A Modified K-Nearest Neighbors Algorithm for the Detection of Heart Disease,” Int. J. Innov. Sci. Technol., vol. 7, no. 4, pp. 2863–2880, 2025, Accessed: Jul. 12, 2026. [Online]. Available: https://ideas.repec.org/a/abq/ijist1/v7y2025i4p2863-2880.html
Swathi Nayak, Manisha Bhat, “Study of distance metrics on k - nearest neighbor algorithm for star categorization,” J. Phys. Conf. Ser., vol. 216, no. 1, 2022, doi: 10.1088/1742-6596/2161/1/012004.
B. A. Hassan et al., “An Enhanced Similarity Measure–Driven K-Nearest Neighbor Framework for Categorical Data Classification,” Int. J. Innov. Sci. Technol., vol. 7, no. 4, pp. 2757–2772, 2025, Accessed: Jul. 12, 2026. [Online]. Available: https://ideas.repec.org/a/abq/ijist1/v7y2025i4p2757-2772.html
Bengting Wan, Zhixiang Sheng, “Compactness-Weighted KNN Classification Algorithm,” Int. J. Adv. Comput. Sci. Appl., vol. 15, no. 9, 2024, [Online]. Available: https://thesai.org/Publications/ViewPaper?Volume=15&Issue=9&Code=IJACSA&SerialNo=22
Murad Mustafa Badarna, Loai Cameel Abedallah, “Active Down-Sampling Method for Knn When Dealing with Imbalance Dataset,” Adv. Artif. Intell. Mach. Learn., vol. 4, no. 3, pp. 2703–2717, 2024, doi: 10.54364/AAIML.2024.43157.
Moohanad Jawthari, Veronika Stoffová, “Predicting students’ academic performance using a modified kNN algorithm,” Pollack Period., pp. 20–26, 2021, doi: https://doi.org/10.1556/606.2021.00374.
Mácio Augusto de Albuquerque, Emanuela Rodrigues do Nascimento, “Comparison between similarity coefficients with application in forest sciences,” Res. Soc. Dev., vol. 11, no. 2, 2022, doi: 10.33448/rsd-v11i2.26046.
A. K. Kar, M. M. Akhter, A. C. Mishra, and S. K. Mohanty, “EDMD: An Entropy based Dissimilarity measure to cluster Mixed-categorical Data,” Pattern Recognit., vol. 155, p. 110674, Nov. 2024, doi: 10.1016/J.PATCOG.2024.110674.
T. Dinh et al., “Categorical data clustering: 25 years beyond K-modes,” Expert Syst. Appl., vol. 272, p. 126608, May 2025, doi: 10.1016/J.ESWA.2025.126608.
Pinyan Liu, Han Yuan, Yilin Ning, Bibhas Chakraborty, Nan Liu & Marco Aurélio Peres, “A modified and weighted Gower distance-based clustering analysis for mixed type data: a simulation and empirical analyses,” BMC Med. Res. Methodol., vol. 24, 2024, [Online]. Available: https://link.springer.com/article/10.1186/s12874-024-02427-8
Mustafa Noaman Kadhim, Dhiah Al-Shammary, “A novel voice classification based on Gower distance for Parkinson disease detection,” Int. J. Med. Inform., vol. 191, p. 105583, 2024, doi: https://doi.org/10.1016/j.ijmedinf.2024.105583.
Osvaldo Velazquez-Gonzalez, Antonio Alarcón-Paredes, “Medical pattern classification using a novel binary similarity approach based on an associative classifier,” Front. Artif. Intell., vol. 8, 2025, doi: https://doi.org/10.3389/frai.2025.1610856.
G. Muhammad, “Enhancing Prognosis Accuracy for Ischemic Cardiovascular Disease Using K Nearest Neighbor Algorithm: A Robust Approach,” IEEE Access, vol. 11, pp. 97879–97895, 2023, doi: 10.1109/ACCESS.2023.3312046.
M. Asif, T. Ahmed Khan and W. -C. Song, “Evaluating Large Language Models for Optimized Intent Translation and Contradiction Detection Using KNN in IBN,” IEEE Access, vol. 13, 2025, doi: 10.1109/ACCESS.2025.3534880.
Khaled Alnowaiser, “Improving Healthcare Prediction of Diabetic Patients Using KNN Imputed Features and Tri-Ensemble Model,” IEEE Access, vol. 12, pp. 16783–16793, 2024, doi: 10.1109/ACCESS.2024.3359760.
Yongxin Peng, “LK-Index: A Learned Index for KNN Queries,” IEEE Access, 2024, doi: 10.1109/ACCESS.2024.3433524.
M. F. I. Amin, A. Shirafuji, M. M. Rahman and Y. Watanobe, “Multi-Label Code Error Classification Using CodeT5 and ML-KNN,” IEEE Access, vol. 12, pp. 100805–100820, 2024, doi: 10.1109/ACCESS.2024.3430558.
“p-Adic Distance Functions and Comparative Performance Analysis of Distance Functions with the k-NN Classifier | Journal of Classification | Springer Nature Link.” Accessed: Jul. 12, 2026. [Online]. Available: https://link.springer.com/article/10.1007/s00357-026-09543-8
“(PDF) Improving K-Nearest Neighbor Algorithm Performance Using Modified Distance Measures.” Accessed: Jul. 12, 2026. [Online]. Available: https://www.researchgate.net/publication/390607523_Improving_K-Nearest_Neighbor_Algorithm_Performance_Using_Modified_Distance_Measures
“Wind Turbine Condition Monitoring Based on Improved Active Learning Strategy and KNN Algorithm | IEEE Journals & Magazine | IEEE Xplore.” Accessed: Jul. 12, 2026. [Online]. Available: https://ieeexplore.ieee.org/document/10041157
Manuel Bullejos, David Cabezas, “Confidence of a k-Nearest Neighbors Python Algorithm for the 3D Visualization of Sedimentary Porous Media,” J. Mar. Sci. Eng., vol. 11, no. 1, p. 60, 2023, doi: https://doi.org/10.3390/jmse11010060.
Y. K. Kim, H. J. Kim, H. Lee, and J. W. Chang, “Privacy-preserving parallel kNN classification algorithm using index-based filtering in cloud computing,” PLoS One, vol. 17, no. 5, p. e0267908, May 2022, doi: 10.1371/JOURNAL.PONE.0267908.
“Jaccard/Tanimoto similarity test and estimation methods for biological presence-absence data | BMC Bioinformatics | Springer Nature Link.” Accessed: Jul. 12, 2026. [Online]. Available: https://link.springer.com/article/10.1186/s12859-019-3118-5
“(PDF) A Survey of Binary Similarity and Distance Measures.” Accessed: Aug. 09, 2026. [Online]. Available: https://www.researchgate.net/publication/266496381_A_Survey_of_Binary_Similarity_and_Distance_Measures
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 50SEA

This work is licensed under a Creative Commons Attribution 4.0 International License.


















