学习笔记之k-nearest neighbors algorithm (k-NN)
k-nearest neighbors algorithm - Wikipedia
- https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm
- Not to be confused with k-means clustering.
- In pattern recognition, the k-nearest neighbors algorithm (k-NN) is a non-parametric method used for classification and regression.[1] In both cases, the input consists of the k closest training examples in the feature space. The output depends on whether k-NN is used for classification or regression.
- k-NN is a type of instance-based learning, or lazy learning, where the function is only approximated locally and all computation is deferred until classification. The k-NN algorithm is among the simplest of all machine learning algorithms.
学习笔记之scikit-learn - 浩然119 - 博客园
- https://www.cnblogs.com/pegasus923/p/9997485.html
- 1.6. Nearest Neighbors — scikit-learn 0.20.2 documentation
- https://scikit-learn.org/stable/modules/neighbors.html#nearest-neighbors-classification
Machine Learning with Python: k-Nearest Neighbor Classifier in Python
- https://www.python-course.eu/k_nearest_neighbor_classifier.php
Refining a k-Nearest-Neighbor classification
- https://www3.nd.edu/~steve/computing_with_data/17_Refining_kNN/refining_knn.html
1.13. Feature selection — scikit-learn 0.20.2 documentation
- https://scikit-learn.org/stable/modules/feature_selection.html
K近邻法(KNN)原理小结 - 刘建平Pinard - 博客园
- http://www.cnblogs.com/pinard/p/6061661.html
- 1. KNN算法三要素
- 2. KNN算法蛮力实现
- 3. KNN算法之KD树实现原理
- 4. KNN算法之球树实现原理
- 5. KNN算法的扩展
- 6. KNN算法小结
scikit-learn K近邻法类库使用小结 - 刘建平Pinard - 博客园
- https://www.cnblogs.com/pinard/p/6065607.html
- 1. scikit-learn 中KNN相关的类库概述
- 2. K近邻法和限定半径最近邻法类库参数小结
- 3. 使用KNeighborsClassifier做分类的实例
特征工程之特征选择 - 刘建平Pinard - 博客园
- https://www.cnblogs.com/pinard/p/9032759.html
特征工程之特征表达 - 刘建平Pinard - 博客园
- https://www.cnblogs.com/pinard/p/9061549.html
特征工程之特征预处理 - 刘建平Pinard - 博客园
- https://www.cnblogs.com/pinard/p/9093890.html
精确率与召回率,RoC曲线与PR曲线 - 刘建平Pinard - 博客园
- https://www.cnblogs.com/pinard/p/5993450.html
k selection
- 设定区间范围,e.g. [1, 25],测试所有k再比较结果
Feature selection
- ablation study : removing some “feature” of the model or algorithm, and seeing how that affects performance.
- 注意如果去掉一个feature之后结果并没有变化,不能说明这个feature没用,原因可能是:
- conditionally independant of the given feature : 其他feature对结果的影响跟它一样
- 不相关feature
- 注意如果去掉一个feature之后结果并没有变化,不能说明这个feature没用,原因可能是:
- test with specified features only
- 注意一个feature有可能跟其他feature一起配合才对结果有positive impact
- test with all combination of features
- 最全面的方法是覆盖所有组合,但是费时
- 折中的方法是从上面两种测试结果中选择出一个小范围有用的feature list,然后测试feature list,跟all features比较性能
学习笔记之k-nearest neighbors algorithm (k-NN)的更多相关文章
- [机器学习系列] k-近邻算法(K–nearest neighbors)
C++ with Machine Learning -K–nearest neighbors 我本想写C++与人工智能,但是转念一想,人工智能范围太大了,我根本介绍不完也没能力介绍完,所以还是取了他的 ...
- 机器学习算法-K-NN的学习 /ML 算法 (K-NEAREST NEIGHBORS ALGORITHM TUTORIAL)
1为什么我们需要KNN 现在为止,我们都知道机器学习模型可以做出预测通过学习以往可以获得的数据. 因为KNN基于特征相似性,所以我们可以使用KNN分类器做分类. 2KNN是什么? KNN K-近邻,是 ...
- 2 kNN-K-Nearest Neighbors algorithm k邻近算法(一)
给定训练数据样本和标签,对于某测试的一个样本数据,选择距离其最近的k个训练样本,这k个训练样本中所属类别最多的类即为该测试样本的预测标签.简称kNN.通常k是不大于20的整数,这里的距离一般是欧式距离 ...
- 2 kNN-K-Nearest Neighbors algorithm k邻近算法(二)
2.3 示例:手写识别系统 2.3 .1 准备数据:将图像转换为测试向量 训练样本:trainingDigits 2000个例子,每个数字大约200个样本 测试数据:testDigits 大约900个 ...
- [PyTorch 学习笔记] 3.1 模型创建步骤与 nn.Module
本章代码:https://github.com/zhangxiann/PyTorch_Practice/blob/master/lesson3/module_containers.py 这篇文章来看下 ...
- 机器学习实战(Machine Learning in Action)学习笔记————02.k-邻近算法(KNN)
机器学习实战(Machine Learning in Action)学习笔记————02.k-邻近算法(KNN) 关键字:邻近算法(kNN: k Nearest Neighbors).python.源 ...
- 学习笔记之scikit-learn
scikit-learn: machine learning in Python — scikit-learn 0.20.0 documentation https://scikit-learn.or ...
- Machine Learning In Action 第二章学习笔记: kNN算法
本文主要记录<Machine Learning In Action>中第二章的内容.书中以两个具体实例来介绍kNN(k nearest neighbors),分别是: 约会对象预测 手写数 ...
- 学习笔记——k近邻法
对新的输入实例,在训练数据集中找到与该实例最邻近的\(k\)个实例,这\(k\)个实例的多数属于某个类,就把该输入实例分给这个类. \(k\) 近邻法(\(k\)-nearest neighbor, ...
随机推荐
- MyBatis sql语句使用总结
MyBatis中Like语句使用总结 oracle数据库: SELECT * FROM user WHERE name like CONCAT('%',#{name},'%') 或 : SELECT ...
- 硬盘安装Linux(ubuntu,centos)
硬盘安装Linux 使用硬盘安装Linux最大的好处不只是方便,是快速.之前使用U盘安装,很慢,没有记录具体时间.Ubuntu区别不大,本身比较小,安装介质只有2G(ubuntu18.10):Cent ...
- ISCC的 Web——WP
比赛已经结束了,自己做出来的题也不是很多,跟大家分享一下 第一题:比较数字大小 打开连接 在里面随意输入一个值,他会提示数字太小了 那么我们输入他允许的最大值试试 他还是提示太小了 我们知道做web‘ ...
- &,~,|,^
与.或.异或的运算 与运算 (“ & ”) 参与运算的两个数据,按照二进制位进行“与运算”.运算规则:0&0=0; 0&1=0; 1&0=0; 1& ...
- django实现api跨域请求访问
第一步:安装 django-cors-headers pip install django-cors-headers 第二步:配置settings.py文件 --------------------- ...
- whmcs之全民idc
http://manage.cn.resellerclub.com/servlet/LogoutPassServlet 原教程例子:http://sharebar.org/1594.html (该教程 ...
- 【liunx】linux后台执行命令:&和nohup
当我们在终端或控制台工作时,可能不希望由于运行一个作业而占住了屏幕,因为可能还有更重要的事情要做,比如阅读电子邮件.对于密集访问磁盘的进程,我们更希望它能够在每天的非负荷高峰时间段运行(例如凌晨).为 ...
- 每天进步一点点-一切皆对象/一次编写,到处运行/bean工厂
只要这个配置文件一写,其他所有的java类都可以用 用法1.直接在类中getBeans,然后调用beans的方法 用法2.将这些bean进行注入,基于xml的注入<property name=& ...
- 家庭记账本web开发
这个系统的整体结构: GitHub:https://github.com/lq1998lq/Test.git com.action包: package com.action; import java. ...
- spring boot 项目 热启动
第一需要 spring-boot-devtools 依赖 <dependency> <groupId>org.springframework.boot</groupId& ...