Efficient kNN Classification With Different Numbers of Nearest Neighbors

被引:905
|
作者
Zhang, Shichao [1 ]
Li, Xuelong [2 ]
Zong, Ming [1 ]
Zhu, Xiaofeng [1 ]
Wang, Ruili [3 ]
机构
[1] Guangxi Normal Univ, Coll Comp Sci & Informat Technol, Guangxi Key Lab MIMS, Guilin 541004, Peoples R China
[2] Chinese Acad Sci, Xian Inst Opt & Precis Mech, Ctr OPT IMagery Anal & Learning, State Key Lab Transient Opt & Photon, Xian 710119, Shaanxi, Peoples R China
[3] Massey Univ, Inst Nat & Math Sci, Auckland 4442, New Zealand
关键词
Decision tree; k nearest neighbor (kNN) classification; sparse coding; IMAGE; SELECTION; EXTRACTION; REGRESSION; ALGORITHM;
D O I
10.1109/TNNLS.2017.2673241
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
k nearest neighbor (kNN) method is a popular classification method in data mining and statistics because of its simple implementation and significant classification performance. However, it is impractical for traditional kNN methods to assign a fixed k value (even though set by experts) to all test samples. Previous solutions assign different k values to different test samples by the cross validation method but are usually time-consuming. This paper proposes a kTree method to learn different optimal k values for different test/new samples, by involving a training stage in the kNN classification. Specifically, in the training stage, kTree method first learns optimal k values for all training samples by a new sparse reconstruction model, and then constructs a decision tree (namely, kTree) using training samples and the learned optimal k values. In the test stage, the kTree fast outputs the optimal k value for each test sample, and then, the kNN classification can be conducted using the learned optimal k value and all training samples. As a result, the proposed kTree method has a similar running cost but higher classification accuracy, compared with traditional kNN methods, which assign a fixed k value to all test samples. Moreover, the proposed kTree method needs less running cost but achieves similar classification accuracy, compared with the newly kNN methods, which assign different k values to different test samples. This paper further proposes an improvement version of kTree method (namely, k*Tree method) to speed its test stage by extra storing the information of the training samples in the leaf nodes of kTree, such as the training samples located in the leaf nodes, their kNNs, and the nearest neighbor of these kNNs. We call the resulting decision tree as k*Tree, which enables to conduct kNN classification using a subset of the training samples in the leaf nodes rather than all training samples used in the newly kNN methods. This actually reduces running cost of test stage. Finally, the experimental results on 20 real data sets showed that our proposed methods (i.e., kTree and k*Tree) are much more efficient than the compared methods in terms of classification tasks.
引用
收藏
页码:1774 / 1785
页数:12
相关论文
共 50 条
  • [31] NS-kNN: a modified k-nearest neighbors approach for imputing metabolomics data
    Lee, Justin Y.
    Styczynski, Mark P.
    METABOLOMICS, 2018, 14 (12)
  • [32] KNN-SC: Novel Spectral Clustering Algorithm Using k-Nearest Neighbors
    Kim, Jeong-Hun
    Choi, Jong-Hyeok
    Park, Young-Ho
    Leung, Carson Kai-Sang
    Nasridinov, Aziz
    IEEE ACCESS, 2021, 9 : 152616 - 152627
  • [33] k-Nearest Neighbors for automated classification of celestial objects
    LiLi Li
    YanXia Zhang
    YongHeng Zhao
    Science in China Series G: Physics, Mechanics and Astronomy, 2008, 51 : 916 - 922
  • [34] Conformal transformation of the metric for k-nearest neighbors classification
    Popescu, Marius Claudiu
    Grama, Lacrimioara
    Rusu, Corneliu
    2020 IEEE 16TH INTERNATIONAL CONFERENCE ON INTELLIGENT COMPUTER COMMUNICATION AND PROCESSING (ICCP 2020), 2020, : 229 - 234
  • [35] Scene Classification using Regional and Nearest Neighbors of Local features
    Amjad, Riffat Tehseen
    Khan, Muhammad Usman
    Tayyab, Abu Muaz Muhammad
    Amjad, Amjad Ali
    Bhatti, Muhammad Naeem Ali
    2021 5TH INTERNATIONAL CONFERENCE ON ADVANCES IN IMAGE PROCESSING, ICAIP 2021, 2021, : 1 - 6
  • [36] Robust Network Anomaly Detection with K-Nearest Neighbors (KNN) Enhanced Digital Twins
    Adjei, Peprah Obed
    Tetarave, Sumit Kumar
    John, Caroline
    Manneh, Madlyn
    Pattnayak, Parthasarathi
    SOUTHEASTCON 2024, 2024, : 421 - 426
  • [37] Internet Traffic Detection using Naive Bayes and K-Nearest Neighbors (KNN) algorithm
    Dixit, Mrudul
    Sharma, Ritu
    Shaikh, Saniya
    Muley, Krutika
    PROCEEDINGS OF THE 2019 INTERNATIONAL CONFERENCE ON INTELLIGENT COMPUTING AND CONTROL SYSTEMS (ICCS), 2019, : 1153 - 1157
  • [38] NS-kNN: a modified k-nearest neighbors approach for imputing metabolomics data
    Justin Y. Lee
    Mark P. Styczynski
    Metabolomics, 2018, 14
  • [39] k-Nearest Neighbors for automated classification of celestial objects
    LI LiLi1
    2 Department of Physics
    3 Weishanlu Middle School
    Science China(Physics,Mechanics & Astronomy), 2008, (07) : 916 - 922
  • [40] k-Nearest Neighbors for automated classification of celestial objects
    Li LiLi
    Zhang YanXia
    Zhao YongHeng
    SCIENCE IN CHINA SERIES G-PHYSICS MECHANICS & ASTRONOMY, 2008, 51 (07): : 916 - 922