学习笔记之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, ...
随机推荐
- [Codeforces Round #526 (Div. 2)]
https://codeforces.com/contest/1084 A题 数据量很小,枚举就行 #include<iostream> #include<cstdio> #i ...
- JAVA的初始化顺序:
JAVA的初始化顺序: 父类的静态成员初始化>父类的静态代码块>子类的静态成员初始化>子类的静态代码块>父类的代码块>父类的构造方法>子类的代码块>子类的构造 ...
- maven(一)
Maven的简介 什么是maven 是apache下的一个开源项目,是纯java开发,并且只是用来管理java项目的 Maven好处 普通的传统项目 maven项目 分析:maven项目为什么这么小? ...
- Java(命令行)打印库存清单
public class demo{ public static void main(String[] args){ //1 顶部 System.out.println("--------- ...
- Generic Realtime Intermediary Protocol
转自:https://pushpin.org/docs/protocols/grip/ Introduction The Generic Realtime Intermediary Protocol ...
- HBase源码分析之WAL
WAL(Write-Ahead Logging)是数据库系统中保障原子性和持久性的技术,通过使用WAL可以将数据的随机写入变为顺序写入,可以提高数据写入的性能.在hbase中写入数据时,会将数据写入内 ...
- js 递归
我理解的递归就是自己调用自己,也就是函数在调用的时候会形成 call stack 调用堆栈.这些数据是用来函数调用完成后,回复之前的函数环境或者局部变量之类的,一般这个都有大小限制,不可能无限生成函数 ...
- React 使用 PropTypes 进行类型检查
注意: React.PropTypes 自 React v15.5 起已弃用.请使用 prop-types 库代替. defaultProps 用来确保 this.props.name 在父组件没有特 ...
- 逻辑回归原理(python代码实现)
Logistic Regression Classifier逻辑回归主要思想就是用最大似然概率方法构建出方程,为最大化方程,利用牛顿梯度上升求解方程参数. 优点:计算代价不高,易于理解和实现. 缺点: ...
- thinkphp5 列表页数据分页查询3-带搜索条件
先加载模板然后在前端HTML页面请求数据 /** * 加载列表页模板 * @author 冯广福 */ public function index() { LogWriteService::write ...