​K近邻算法我要分享

K-nearest neighbor algorithm

K. knn

关注次数: 245

下载次数: 1

文件大小: 13KB

代码分类: 智能算法

开发平台: matlab

下载需要积分: 1积分

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

代码描述

中文说明:

K近邻算法。是一个理论上比较成熟的方法,也是最简单的机器学习算法之一。该方法的思路是:在特征空间中,如果一个样本附近的k个最近(即特征空间中最邻近)样本的大多数属于某一个类别,则该样本也属于这个类别。


English Description:

K-nearest neighbor algorithm. It is a mature method in theory and one of the simplest machine learning algorithms. The idea of this method is: in the feature space, if most of the k nearest samples near a sample belong to a certain category, then the sample also belongs to this category.


代码预览

knn\datingTestSet2.txt

knn\KNN.m

knn\KNNdatgingTest.m

knn