KNN

作者: 钱晓缺 | 来源:发表于2020-07-07 11:51 被阅读0次

KNN学习笔记

KNN is a classification algorithm which is instance-based learning and lazy learning(classify when testing).

Algorithm steps:

1. To classify the unknown instance, take all known instances as the references.

2. Choose K as the parameter and get the distance of unknown instance and all known instances.

3. According to majority-voting, classify unknown instance as the category which has most instances of K.

Details:

About K: how to measure distance?

Euclidean Distance 

E(x,y) is the distance of X and Y in the N dimensional space.

Other methods: cos, correlation, Manhattan distance. 

Disadvantage: 

1. waste space to save a lot of instances.

2. High complexity

3. If the instances of one category are majority, the new instance is easier to be consider as this category.(Add weight according to distance)

相关文章

  • Spark --基于DataFrame API实现KNN算法

    Spark -- 基于DataFrame API实现KNN算法 KNN简介 KNN(k-Nearest Neigh...

  • KNN近邻算法总结

    目录 一、KNN近邻算法思想 二、KNN模型三大要素 三、KNN算法实现步骤 四、KNN算法的KD树实现 五、总结...

  • 利用Python进行数字识别

    思路 通过Python实现KNN算法。而KNN算法就是K最近邻(k-Nearest Neighbor,KNN)分类...

  • KNN

    KNN学习笔记 KNN is a classification algorithm which is instan...

  • 第六节分类算法

    1knn算法 1.1knn的过程 1.2scilit-learn中的knn 1.3scikit-learn机器学习...

  • knn算法

    knn算法 knn算法简介 邻近算法,或者说K最近邻(kNN,k-NearestNeighbor)分类算法。所谓K...

  • 机器学习笔记汇总

    kNN算法:K最近邻(kNN,k-NearestNeighbor)分类算法

  • 01 KNN算法 - 概述

    KNN算法全称是K近邻算法 (K-nearst neighbors,KNN) KNN是一种基本的机器学习算法,所谓...

  • KNN算法-1-KNN简介

    KNN入门 1、KNN简介 kNN(k-NearestNeighbor),也就是k最近邻算法,这是一种有监督的学习...

  • KNN算法以及欧式距离

    1.KNN算法介绍 KNN 是什么? KNN(K-Nearest Neighbor)是最简单的机器学习算法之一,可...

网友评论

      本文标题:KNN

      本文链接:https://www.haomeiwen.com/subject/eydaqktx.html