A Weighted Similarity Measure for k-Nearest Neighbors Algorithm
Abstract
One of the most important problems in machine learning, which has gained importance in recent years, is classification. The k-nearest neighbors (kNN) algorithm is widely used in classification problem because it is a simple and effective method. However, there are several factors affecting the performance of kNN algorithm. One of them is determining an appropriate proximity (distance or similarity) measure. Although the Euclidean distance is often used as a proximity measure in the application of the kNN, studies show that the use of different proximity measures can improve the performance of the kNN. In this study, we propose the Weighted Similarity k-Nearest Neighbors algorithm (WS-kNN) which use a weighted similarity as proximity measure in the kNN algorithm. Firstly, it calculates the weight of each attribute and similarity between the instances in the dataset. And then, it weights similarities by attribute weights and creates a weighted similarity matrix to use as proximity measure. The proposed algorithm is compared with the classical kNN method based on the Euclidean distance. To verify the performance of our algorithm, experiments are made on 10 different real-life datasets from the UCI (UC Irvine Machine Learning Repository) by classification accuracy. Experimental results show that the proposed WS-kNN algorithm can achieve comparative classification accuracy. For some datasets, this new algorithm gives highly good results. In addition, we demonstrated that the use of different proximity measures can affect the classification accuracy of kNN algorithm.
Keywords
References
- 1. Jordan, MI, Mitchell, TM. 2015. Machine learning: Trends, perspectives, and prospects. Science; 349(6245): 255-260.
- 2. Singh, A, Thakur, N, Sharma, A. A review of supervised machine learning algorithms. In 2016 3rd International Conference on Computing for Sustainable Global Development (INDIACom), IEEE, March 2016, pp. 1310-1315.
- 3. Cekik, R, Telceken, S. 2018. A new classification method based on rough sets theory. Soft Computing; 22(6): 1881-1889.
- 4. Soofi, AA, Awan, A. 2017. Classification Techniques in Machine Learning: Applications and Issues. Journal of Basic and Applied Sciences; 13: 459-465.
- 5. Aggarwal, CC. 2014. Instance-Based Learning: A Survey. Data Classification: Algorithms and Applications, 157.
- 6. Angiulli, F, Narvaez, E. 2018. Pruning strategies for nearest neighbors competence preservation learners. Neurocomputing; 308: 8-20.
- 7. Prasath, VB, Alfeilat, HAA, Lasassmeh, O, Hassanat, A. 2017. Distance and Similarity Measures Effect on the Performance of K-Nearest Neighbors Classifier-A Review. arXiv preprint arXiv:1708.04321.
- 8. Lei, Y, Zuo, MJ. 2009. Gear crack level identification based on weighted K nearest neighbors classification algorithm. Mechanical Systems and Signal Processing; 23(5): 1535-1547.
Details
Primary Language
English
Subjects
-
Journal Section
Research Article
Publication Date
December 30, 2019
Submission Date
September 11, 2019
Acceptance Date
December 18, 2019
Published in Issue
Year 2019 Volume: 15 Number: 4
Cited By
An improved KNN classifier based on a novel weighted voting function and adaptive k-value selection
Neural Computing and Applications
https://doi.org/10.1007/s00521-023-09272-8Improved versatility and robustness of bearing fault detection and diagnostic method for nuclear power plant
Nuclear Engineering and Design
https://doi.org/10.1016/j.nucengdes.2024.113474Improving multi-class classification: scaled extensions of harmonic mean-based adaptive k-nearest neighbors
Applied Intelligence
https://doi.org/10.1007/s10489-024-06109-2