Kernel的意义
在第7章最后一段讲到Kernel,Kernel就是用向量表示元素的和的乘积。
Back in our discussion of linear regression, we had a problem in which the input x was the living area of a house, and we considered performing regression using the features x, x2 and x3 (say) to obtain a cubic function. To distinguish between these two sets of variables, we’ll call the “original” input value the input attributes of a problem (in this case, x, the living area). When that is mapped to some new set of quantities that are then passed to the learning algorithm, we’ll call those new quantities the input features. (Unfortunately, different authors use different terms to describe these two things, but we’ll try to use this terminology consistently in these notes.) We will also let φ denote the feature mapping, which maps from the attributes to the features. For instance, in our example, we had
回到我们关于线性回归的讨论,我们有一个关于用x表示我们房子的居住面积问题,而我们考虑使用特征x, x2和x3来进行回归,得到一个立方函数。为了区分这两组变量,我们将会把“原始输入值”称为“一个问题的输入属性”(在该例中,x指的是居住面积)。当将它映射到一组新的数量集时,然后将传递给学习算法,我们将把这些新的数量集称为输入特征。(不幸地是,不同的作者将使用不同的术语描述这两种事情,但是我们将尽量持续地在本教程集中使用该术语。)我们还将使用φ表示特征映射,他将属性(x)映射到特征(x,x2,x3)。例如,

Rather than applying SVMs using the original input attributes x, we may instead want to learn using some features φ(x). To do so, we simply need to go over our previous algorithm, and replace x everywhere in it with φ(x).
而非使用原始输入属性x应用SVM支持向量机,我们可能想使用一些特征φ(x)学习。要这么做,我们只需简单地浏览一下我们之前的算法,用φ(x)替代x。
Since the algorithm can be written entirely in terms of the inner products<x,z>, this means that we would replace all those inner products with <φ(x), φ(z)>. Specificically, given a feature mapping φ, we define the corresponding Kernel to be
既然算法可以完全以内积<x,z>来写,这意味着我们可以以<φ(x), φ(z)>替代这些内积。特别地,给定特征映射φ的话,我们定义相应的Kernel核为:
K(x, z) = φ(x)Tφ(z).
Then, everywhere we previously had <x, z> in our algorithm, we could simply replace it with K(x, z), and our algorithm would now be learning using the features φ.
然后,在之前我们的算法中每个有<x,z>的地方,我们可以简单地用K(x,z)替代,从而我们的算法如今可以使用特征φ来进行学习了。
Now, given φ, we could easily compute K(x, z) by finding φ(x) and φ(z) and taking their inner product. But what’s more interesting is that often, K(x, z) may be very inexpensive to calculate, even though φ(x) itself may be very expensive to calculate (perhaps because it is an extremely high dimensional vector). In such settings, by using in our algorithm an efficient way to calculate K(x, z), we can get SVMs to learn in the high dimensional feature space space given by φ, but without ever having to explicitly find or represent vectors φ(x).
现在,给定φ的话,我们可以轻松地计算K(x,z),只要找到φ(x)和φ(z),然后计算内积即可。但是更有趣的是,通常K(x,z)可能计算是不昂贵的,尽管φ(x)自身可能计算很昂贵(可能因为它是一个十分高维度的向量)。在这种设定下,在我们的算法中使用一种有效的方法来计算K(x,z),我们可以让SVM学习在φ给定的高维度特征空间空间,但是不要必须精确找到或者表达向量φ(x)。
Lets see an example. Suppose x, z ∈ Rn , and consider
让我看一个例子。假设x,z∈Rn, 并且考虑
K(x, z) = (xTz) 2
We can also write this as
我们还可以把它写为

Thus, we see that K(x, z) = φ(x)Tφ(z), where the feature mapping φ is given (shown here for the case of n = 3) by
因此,我们看到K(x, z) = φ(x)Tφ(z),其中特征映射φ由以下给出(该例中n=3)

Note that whereas calculating the high-dimensional φ(x) requires O(n2) time, finding K(x, z) takes only O(n) time—linear in the dimension of the input attributes.
注意到计算高维度的φ(x)需要O(n2)次,而K(x,z)只需要O(n)次——输入属性的维度是线性的。
For a related kernel, also consider
对于一个相关的核,还需要考虑

(Check this yourself.) This corresponds to the feature mapping (again shown for n = 3)
(自己检验)它相关的特征映射(还是n=3)

and the parameter c controls the relative weighting between the xi (first order) and the xixj (second order) terms.
参数c控制了xi(一阶)和xixj(二阶)之间的相对权重。
Kernel的意义的更多相关文章
- 机器学习——SVM详解(标准形式,对偶形式,Kernel及Soft Margin)
(写在前面:机器学习入行快2年了,多多少少用过一些算法,但由于敲公式太过浪费时间,所以一直搁置了开一个机器学习系列的博客.但是现在毕竟是电子化的时代,也不可能每时每刻都带着自己的记事本.如果可以掏出手 ...
- 浅谈kernel的结构图及生成过程-----(1)
当今,我们身边如此多的服务器,工作站都运行着linux,因此也有不少的朋友想了解linux内的核心机理.但是由于kernel过于庞大,以致让一些朋友望而却步.(我在大二的时候也有过此经历,当时看到一些 ...
- MIT一牛人对数学在机器学习中的作用给的评述
MIT一牛人对数学在机器学习中的作用给的评述 转载自http://my.oschina.net/feedao/blog/52252,不过这个链接也是转载的,出处已经无从考证了. 感觉数学似乎总是不 ...
- linux内核(kernel)版本号的意义
转自:http://www.cnblogs.com/jsjliuxing/archive/2011/12/01/2271182.html 在linux下有一个目录,即/usr/src/kernels/ ...
- MIT JOS学习笔记02:kernel 01(2016.10.28)
未经许可谢绝以任何形式对本文内容进行转载! 在文章开头不得不说的是,因为这部分的代码需要仔细理清的东西太多,所以导致这篇分析显得很啰嗦,还请谅解. 我们在上一篇文章已经分析了Boot Loader的功 ...
- sysctl kernel parameter Optimization note
syncookies cookies the connection state,when the ack arrives,then deal with the pause connection,ver ...
- linux kernel tainted
日志中会有一些信息: dmesg | grep -i tainted 具体代码可以通过proc看到: cat /proc/sys/kernel/tainted 数字的意义: tainted: Non- ...
- 【软件分析与挖掘】Multiple kernel ensemble learning for software defect prediction
摘要: 利用软件中的历史缺陷数据来建立分类器,进行软件缺陷的检测. 多核学习(Multiple kernel learning):把历史缺陷数据映射到高维特征空间,使得数据能够更好地表达: 集成学习( ...
- LWP 轻量级线程的意义与实现
转子 http://www.ibm.com/developerworks/cn/linux/kernel/l-thread/ 二.Linux 2.4内核中的轻量进程实现 最初的进程定义都包含程序.资源 ...
随机推荐
- 关于android开发环境中sdk和adt更新到22.6之后多了appcompat_v7
昨天我打开Eclipse更新了一下sdk和adt到22.6,更新一切都很顺利,很开心的样子,可以新建一个工程时发现多了一个appcompat_v7这个东西,一下子就把小编怔住了,后来才发现这是官方的一 ...
- laravel查看sql语句
我自己是用第一种方法来调试的,第三种不行 不知道为啥 laravel查看sql语句 方法一: 我们有时候想测试一段代码生产的 SQL 语句,比如: 我们想看 App\User::all(); 产生的 ...
- MongoDB Data Model 浅谈
MongoDB 对于数据的 schema 要求很灵活. 与 MySQL 相比,collection 并不会强制文档的结构.(MySQL 在定义表时, 需要指定有哪些字段.类型.展示长度等) 因此,插入 ...
- MongoDB 4.X搭建
一.MongoDB4.X搭建 1.下载mongdb安装包,在官网上找到对应的版本,我的是centos7 找到上面的连接,通过命令行: 2.将下载的mongodb-linux-x86_64-4.0.0. ...
- IDA Pro 权威指南学习笔记(一) - 启动 IDA
启动 IDA 启动 IDA,有一个欢迎界面 之后有一个对话框 选择 New 将启动一个对话框来选择将要分析的文件 选择 Go 将使 IDA 打开一个空白的工作区 如果要选择分析的文件,可以直接拖到 I ...
- Linux日志文件查看和搜查命令(错误日志排查定位)
一.cat命令 cat 命令用于连接文件并打印到标准输出设备上,主要用来查看文件内容,创建文件,文件合并,追加文件内容等功能. 语法格式 cat [-AbeEnstTuv] fileName 参数说明 ...
- Ubantu下安装adobe flash player插件
用火狐看视频,要打开Adobe官网下载xxxx,太麻烦. 可以在Terminal下输入: apt-get install flashplugin-nonfree 好了.
- JavaScript第二节
1.动态属性 引用类型可以动态的添加属性,而基本类型不行. 2.复制变量值 3.检测类型 执行环境和作用域 没有块级作用域 引用类型 1.Object类型 2.Array类型 数组初始化: 检测数组: ...
- C++数组与指针回顾总结
//数组名是常量指针, //a+1 是相对数组起始地址偏移了sizeof(int)字节 //&a+1 是相对于数组起始地址偏移了sizeof(a)字节 , , , }; cout <&l ...
- 判定元素是否刚插入到DOM树
上接<这篇博文>,其应用于avalon的if绑定.如果一个节点还没有插入DOM树,那么avalon将延时对它进行扫描渲染,直到它再次插入到DOM树为止.由于CSS3 keyframe动画的 ...