ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

K-means VS K-NN and 手肘法

2020-01-21 23:53:42  阅读:756  来源: 互联网

标签:classification NN means VS learning between difference data


1. The difference between classification and clustering. from here.

Classification: supervised learning with labels.

Clustering: unsupervised learning without labels. 

Classification and Clustering are the two types of learning methods which characterize objects into groups by one or more features. These processes appear to be similar, but there is a difference between them in the context of data mining. The prior difference between classification and clustering is that classification is used in supervised learning technique where predefined labels are assigned to instances by properties, on the contrary, clustering is used in unsupervised learning where similar instances are grouped, based on their features or properties.

2. The difference between k-means and k-NN. from here.

k-means: an unsupervised algorithm used for clustering.

k-NN: a supervised algorithm used for classification. 

3. K-NN algorithm

K-nearest neighbours needs labelled data to train on. With the given data, KNN can classify new, unlabelled data by analysis of the k number of the nearest data points. 

Steps

  1. 计算测试数据与各个训练数据之间的距离;
  2. 按照距离的递增关系进行排序;

  3. 选取距离最小的K个点;

  4. 确定前K个点所在类别的出现频率;

  5. 返回前K个点中出现频率最高的类别作为测试数据的预测分类。

4. K-means algorithm

Steps

  1. Initially, randomly pick k centroids/cluster centers. Try to make them near the data but different from one another.
  2. Then assign each data point to the closest centroid.
  3. Move the centroids to the average location of the data points assigned to it.
  4. Repeat the preceding two steps until the assignments don’t change, or change very little.

 

标签:classification,NN,means,VS,learning,between,difference,data
来源: https://www.cnblogs.com/dulun/p/12227384.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有