登录
首页 » Python » python-实现knn算法

python-实现knn算法

于 2022-02-02 发布 文件大小:774.69 kB
0 123
下载积分: 2 下载次数: 2

代码说明:

k近邻算法,k NearestNeighbor(KNN),它的工作原理如下:    存在一个样本数据集合,也称作训练样本集,并且样本集中每个数据都存在标签,即我们知道样本集中每一数据与所属分类的对应关系。当输入没有标签的新数据后,将新数据的每个特征与样本集中数据对应的特征进行比较,然后算法提取样本集中特征最相似数据(最近邻)的分类标签。一般来说,我们只选择样本数据集中前k个最相似的数据,这就是k近邻算法中k的出处,通常k是不大于20的整数。最后,选择k个最相似数据中出现次数最多的分类,作为新数据的分类。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • my_serial
    串口调试助手,用python实现的串口助手功能,打包成exe后可以直接使用(Serial debugging assistant)
    2014-06-17 08:30:56下载
    积分:1
  • usrp_spectrum_sense.py.tar
    提供基本的基于能量检测的频谱感知功能,需要结合软件无线电外设USRP使用(Providing basic spectrum sensing capabilities based on energy detection requires the use of software radio peripheral USRP)
    2017-09-20 20:19:56下载
    积分:1
  • 深度学习mtcnn
    说明:  用市面上的摄像头,可以实现实时人脸识别功能。(The algorithm model of facenet face recognition is obtained through deep learning, and the backbone network of feature extraction is concept-resnetv1, which is developed from concept network and RESNET, with more channels and network layers, so that each layer can learn more features and greatly improve the generalization ability. The network is deeper, the amount of calculation in each layer is reduced, and the ability of feature extraction is strengthened, so as to improve the accuracy of target classification. On the LFW data set, the accuracy of face recognition reaches 98.40%. In this experiment, mtcnn is introduced into the face detection algorithm. Its backbone network is divided into three convolutional neural networks: p-net, R-Net and o-net. Among them, o-net is the most strict in screening candidate face frames. It will output the coordinates of a human face detection frame and five facial feature points (left eye, right eye, nose, left mouth corner, right mouth corner).)
    2020-11-16 22:10:22下载
    积分:1
  • vgae_pytorch-master
    说明:  图形自动编码器的pytorch实现,参考论文vgae(Implementation of graph self encoder gae with Python)
    2021-03-19 10:59:19下载
    积分:1
  • python基于BBS类型网站的爬虫
    python基于BBS类型网站的爬虫 适用于一般的bbs网站
    2022-01-25 22:39:19下载
    积分:1
  • Harmony Search
    2022-07-03 06:25:16下载
    积分:1
  • deeplab V3和unet
    利用全卷积神经网络,实现图像的语义分割,基于tensorflow的keras可以直接运行(Using the full convolutional neural network to achieve semantic segmentation of images, keras based on tensorflow can be run directly)
    2019-05-31 22:03:57下载
    积分:1
  • my_report
    以此软件包为基础设计了计算微分方程差分格式,以及部分差分格式稳定性分析的程序。文件中有word介绍程序的使用方法(On the basis of this software package, the difference schemes for calculating differential equations and the program for stability analysis of some difference schemes are designed.)
    2020-08-15 00:48:27下载
    积分:1
  • Deep Learning in Python Master
    说明:  通过Python,Theano和Tensorflow,掌握数据科学和机器学习(Master Data Science and Machine Learning with Modern Neural Networks written in Python, Theano, and TensorFlow)
    2019-03-05 21:02:26下载
    积分:1
  • SpeechEmoRec-master
    语音情感识别。使用卷积神经网络对语音情感识别(speech emotion recognition)
    2020-09-19 15:17:57下载
    积分:1
  • 696518资源总数
  • 105949会员总数
  • 22今日下载