knn最近邻算法_k最近邻knn算法

knn最近邻算法

目录: (Table of Contents:)

  1. What is KNN?

    什么是KNN?
  2. Working of KNN algorithm

    KNN算法的工作
  3. What happens when K changes?

    当K变化时会发生什么?
  4. How to select appropriate K?

    如何选择合适的K?
  5. Limitation of KNN

    KNN的局限性
  6. Real-world application of KNN

    KNN的实际应用
  7. Conclusion

    结论

1.什么是KNN? (1. What is KNN?)

K nearest neighbors (KNN) is a supervised machine learning algorithm. A supervised machine learning algorithm’s goal is to learn a function such that f(X) = Y where X is the input, and Y is the output. KNN can be used both for classification as well as regression. In this article, we will only talk about classification. Although for regression, there is just a minute change.

K最近邻居(KNN)是一种受监督的机器学习算法。 监督式机器学习算法的目标是学习一个函数,使得f(X)= Y,其中X是输入,Y是输出。 KNN可用于分类和回归。 在本文中,我们仅讨论分类。 尽管要进行回归,但只有一分钟的变化。

The properties of KNN is that it is a lazy learning algorithm and a non-parametric method.

KNN的特性是它是一种惰性学习算法和非参数方法。

Lazy learning means the algorithm takes almost zero time to learn because it only stores the data of the training part (no learning of a function). The stored data will then be used for the evaluation of a new query point.

惰性学习意味着该算法几乎只需花费零时间进行学习,因为它仅存储训练部分的数据(不学习功能)。 然后,存储的数据将用于评估新的查询点。

The non-parametric method refers to a method that does not assume any distribution. Therefore, KNN does not have to find any parameter for the distribution. While in the parametric method, the model finds new parameters, which in turn will be used for the prediction purpose. The only hyperparameter (provided by the user to the model) KNN has is K, which is the number of points that needs to be considered for comparison purpose.

非参数方法是指不假定任何分布的方法。 因此,KNN不必为分布找到任何参数。 在参数化方法中,模型会找到新参数,这些参数又将用于预测目的。 KNN唯一的超参数(由用户提供给模型)是K,这是比较目的需要考虑的点数。

Image for post
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值