Abstract
K-nearest neighbor (k-nn) is a widely used classifier in machine learning and data mining, and is very simple to implement. The k-nn classifier predicts the class label of an unknown object based on the majority of the computed class labels of its k nearest neighbors. The prediction accuracy of the k-nn classifier depends on the user input value of k and the distance measure used to compute the nearest neighbors from the training objects. If we use a static value for k for a particular classification task, the prediction accuracy of a k-nn classifier may decrease due to class imbalance in a dataset. In this paper, we propose a modified k-nn classifier that considers class imbalance in a dataset, and computes an appropriate value for k. The proposed k-nn classifier has been validated on a large number of benchmark datasets from various domains. The method is compared with traditional k-nn, decision tree, random forest and SVM classifiers, and the method yields significantly better prediction accuracy than the traditional the k-nn classifier and other algorithms.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
X. Wu, V. Kumar, J.R. Quinlan, J. Ghosh, Q. Yang, H. Motoda, G.J. McLachlan, A. Ng, B. Liu, S.Y. Philip et al., Top 10 algorithms in data mining. Knowl. Inf. Syst. 14(1), 1–37 (2008)
S. Zhang, KNN-CF approach: incorporating certainty factor to KNN classification. IEEE Intell. Inform. Bull. 11(1), 24–33 (2010)
Y. Qin, S. Zhang, X. Zhu, J. Zhang, C. Zhang, Semi-parametric optimization for missing data imputation. Appl. Intell. 27(1), 79–88 (2007)
X. Zhu, S. Zhang, Z. Jin, Z. Zhang, Z. Xu, Missing value estimation for mixed-attribute data sets. IEEE Trans. Knowl. Data Eng. 23(1), 110–121 (2011)
S. Zhang, X. Li, M. Zong, X. Zhu, D. Cheng, Learning k for kNN classification. ACM Trans. Intell. Syst. Technol. (TIST) 8(3), 43 (2017)
J. Maillo, S. Ramrez, I. Triguero, F. Herrera, kNN-IS: an iterative spark-based design of the k-nearest neighbors classifier for big data. Knowl.-Based Syst. 117, 3–15 (2017)
N. Paperno, P. McDaniel, Deep k-nearest neighbors: towards confident, interpretable and robust deep learning (2018)
A.S. Arefin, C. Riveros, R. Berretta, P. Moscato, GPU-FS-kNN: a software tool for fast and scalable KNN computation using GPUs. PLoS ONE 7(8), e44000 (2012)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this chapter
Cite this chapter
Hoque, N., Bhattacharyya, D.K., Kalita, J.K. (2021). KNN-DK: A Modified K-NN Classifier with Dynamic k Nearest Neighbors. In: Bansal, J.C., Fung, L.C.C., Simic, M., Ghosh, A. (eds) Advances in Applications of Data-Driven Computing. Advances in Intelligent Systems and Computing, vol 1319. Springer, Singapore. https://doi.org/10.1007/978-981-33-6919-1_2
Download citation
DOI: https://doi.org/10.1007/978-981-33-6919-1_2
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-33-6918-4
Online ISBN: 978-981-33-6919-1
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)