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内核中的轻量进程实现 最初的进程定义都包含程序.资源 ...
随机推荐
- split的用法回顾,快忘记了@ →@
split:用for循环时不要忘记是数组名.length package com.aaa; //split的用法把指定的字符串按指定的分割符进行分割,然后返回字符串 数组 public class f ...
- php中的continue用法
continue 2 表示跳出两层 continue 默认跳出一层 if (count($content_arr) > 0 ) { // 获取相应的goods数据 $goodsdata = ar ...
- microtime() 测试代码执行时间,提高编码效率
<?php $b_time = microtime(true); $a = array("); $count = ; foreach ($a as $key => $value) ...
- mysql核心参数优化
MySQL数据库服务器配置CPU的优化内存的优化IO的优化连接的优化数据一致性的优化 1.描述back_log参数的作用? back_log = 500 要求 MySQL 能有的连接数量.当主要MyS ...
- [置顶]
sscanf() - 从一个字符串中读进与指定格式相符的数据
在做一道九度上机题时,突然发现sscanf()函数非常有用,就顺便从网上搜集资料整理一下. sscanf() 的作用:从一个字符串中读进与指定格式相符的数据. 原型: int sscanf (cons ...
- 爬了个爬(三)Scrapy框架
参考博客:武Sir Scrapy是一个为了爬取网站数据,提取结构性数据而编写的应用框架. 其可以应用在数据挖掘,信息处理或存储历史数据等一系列的程序中.其最初是为了页面抓取 (更确切来说, 网络抓取 ...
- PHP文件操作(二)-文件的读取
1.fread() //读取打开的文件 fread(file,length) file:必选项,规定要读取的打开的文件 length:必选项,规定要读取的最大字节数. <?php $fil ...
- GET、POST详解 --转自http://hi.baidu.com/richarwu/item/bd43633a6ba62986b611dbcd
HTTP Get,Post请求详解 请求类型 三种最常见的请求类型是:GET,POST 和 HEAD GET:获取一个文档 大部分被传输到浏览器的html,images,js,css, … 都是通过G ...
- Java面向对象-方法的定义及简单使用
Java面向对象之方法 方法是对象的一部分,也称为行为: 先来一个简单实例: package com.java1234.chap03.sec03; public class Person { void ...
- linux进程的问题
#include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <pthread.h& ...