K最邻近分类法我要分享

K-nearest neighbor classification

matlab

关注次数: 175

下载次数: 0

文件大小: 1.79 kB

代码分类: 其他

开发平台: matlab

下载需要积分: 2积分

版权声明:如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

代码描述

中文说明: 1.计算待分类数据和不同类中每一个数据的距离(欧氏或马氏)。 2.选出最小的前K数据个距离,这里用到选择排序法。 3.对比这前K个距离,找出K个数据中包含最多的是那个类的数据,即为待分类数据所在的类。 不通俗但严谨的规则是:


English Description:

1. calculation data to be disaggregated data and each in a different class of distance (Euclidean or Mahalanobis). 2. choose the smallest k data from before, there used to select sort method. 3. compare the k distance before, find k data contains most of the classes of data, namely for categories containing class. Click the file on the left to start the preview,please !The preview only provides 20% of the code snippets, the complete code needs to be downloaded Loading Report


代码预览