距离度量对K近邻(KNN)算法分类精度起着重要的作用。传统KNN算法通常采用欧氏距离,但该距离将所有特征的差别平等对待,忽略了数据的局部内在几何结构特征。针对此问题,文章借鉴局部保持投影(LPP)的基本思想,在考虑数据的局部内在几何结构特征基础上,依据类内局部保持散度矩阵构造一种距离度量新方法,利用该距离度量提出一种局部保持K近邻算法。实验结果表明,与采用欧氏距离和传统马氏距离的KNN相比,本算法能够得到更好的分类精度。
The distance metric plays an important role in K-nearest neighbor( KNN) algorithm. The traditional KNN algorithm usually employs the Euclidean distance. However,this distance treats all features equally and ignores the local intrinsic geometric structural characteristics of data. In this paper,following the basic idea of locality preserving projection( LPP),we firstly used the locality preserving within-class scatter matrix to propose a novel distance metric,then we developed a modified version of KNN called locality preserving K-nearest neighbor( LPKNN). The proposed method takes the local intrinsic geometric structural characteristics of data into full consideration. The experimental results indicate that the proposed algorithm can obtain higher classification accuracy in contrast with the KNN algorithm based on the Euclidean distance and the traditional Mahalanobis distance.