svm

svm

计算机算法术语
在机器学习领域,支持向量机SVM(Support Vector Machine)是一个有监督的学习模型,通常用来进行模式识别、分类、以及回归分析。SVM(Support Vector Machine)是二元分类算法。给定一组2种类型的N维的地方点,SVM(Support Vector Machine)产生一个(N-1)维超平面到这些点分成2组。假设你有2种类型的点,且它们是线性可分的。SVM(Support Vector Machine)将找到一条直线将这些点分成2种类型,并且这条直线会尽可能地远离所有的点。[1]
    中文名:支持向量机 外文名:Support Vector Machine 所属学科: 所属方向:机器学习 属性:是一个有监督的学习模型

简介

1、线性可分支持向量机:给定线性可分的训练数据集,通过(硬)间隔最大化或者等价的求解相应的凸二次规划问题学习得到的分离超平面为:w∗x+b=0w∗x+b=0以及相应的分类决策函数: f(x)=sign(w∗x)+bf(x)=sign(w∗x)+b。

2、线性支持向量机给定线性不可分的训练数据集,通过软件间隔最大化或者等价的求解相应的凸二次规划问题学习得到的分离超平面为:w∗x+b=0w∗x+b=0以及相应的分类决策函数: f(x)=sign(w∗x)+bf(x)=sign(w∗x)+b。

3、非线性支持向量机从非线性分类训练集,通过核函数与软间隔最大化,或者凸二次优化,学习得到的分类决策函数f(x)=sign(∑i=1NαiyIK(x,xi)+b)f(x)=sign(∑i=1NαiyIK(x,xi)+b)其中,K(x,z)K(x,z) 是正定核函数。

基本情况

Vapnik等人在多年研究统计学习理论基础上对线性分类器提出了另一种设计最佳准则。其原理也从线性可分说起,然后扩展到线性不可分的情况。甚至扩展到使用非线性函数中去,这种分类器被称为支持向量机(Support Vector Machine,简称SVM)。支持向量机的提出有很深的理论背景。

支持向量机方法是在后来提出的一种新方法。

SVM的主要思想可以概括为两点:

⑴它是针对线性可分情况进行分析,对于线性不可分的情况,通过使用非线性映射算法将低维输入空间线性不可分的样本转化为高维特征空间使其线性可分,从而 使得高维特征空间采用线性算法对样本的非线性特征进行线性分析成为可能;

例子

如右图:

将1维的“线性不可分”上升到2维后就成为线性可分了。

⑵它基于结构风险最小化理论之上在特征空间中建构最优分割超平面,使得学习器得到全局最优化,并且在整个样本空间的期望风险以某个概率满足一定上界。

在学习这种方法时,首先要弄清楚这种方法考虑问题的特点,这就要从线性可分的最简单情况讨论起,在没有弄懂其原理之前,不要急于学习线性不可分等较复杂的情况,支持向量机在设计时,需要用到条件极值问题的求解,因此需用拉格朗日乘子理论,但对多数人来说,以前学到的或常用的是约束条件为等式表示的方式,但在此要用到以不等式作为必须满足的条件,此时只要了解拉格朗日理论的有关结论就行。

一般特征

(1)SVM学习问题可以表示为凸优化问题,因此可以利用已知的有效算法发现目标函数的全局最小值。而其他分类方法(如基于规则的分类器和人工神经网络)都采用一种基于贪心学习的策略来搜索假设空间,这种方法一般只能获得局部最优解。

(2)SVM通过最大化决策边界的边缘来控制模型的能力。尽管如此,用户必须提供其他参数,如使用核函数类型和引入松弛变量等。

(3)通过对数据中每个分类属性引入一个哑变量,SVM可以应用于分类数据。

(4)SVM一般只能用在二类问题,对于多类问题效果不好。

原理简介

SVM方法是通过一个非线性映射p,把样本空间映射到一个高维乃至无穷维的特征空间中(Hilbert空间),使得在原来的样本空间中非线性可分的问题转化为在特征空间中的线性可分的问题.简单地说,就是升维和线性化.升维,就是把样本向高维空间做映射,一般情况下这会增加计算的复杂性,甚至会引起“维数灾难”,因而人们很少问津.但是作为分类、回归等问题来说,很可能在低维样本空间无法线性处理的样本集,在高维特征空间中却可以通过一个线性超平面实现线性划分(或回归).一般的升维都会带来计算的复杂化,SVM方法巧妙地解决了这个难题:应用核函数的展开定理,就不需要知道非线性映射的显式表达式;由于是在高维特征空间中建立线性学习机,所以与线性模型相比,不但几乎不增加计算的复杂性,而且在某种程度上避免了“维数灾难”.这一切要归功于核函数的展开和计算理论.

选择不同的核函数,可以生成不同的SVM,常用的核函数有以下4种:

线性核函数K(x,y)=x·y;

多项式核函数K(x,y)=[(x·y)+1]^d;

径向基函数K(x,y)=exp(-|x-y|^2/d^2)

二层神经网络核函数K(x,y)=tanh(a(x·y)+b).

语言

C/C++

Lush -- an Lisp-like interpreted/compiled language with C/C++/Fortran interfaces that haspackages to interface to a number of different SVM implementations. Interfaces to LASVM,LIBSVM,mySVM,SVQP,SVQP2 (SVQP3 in future) are available. Leverage these against Lush's other interfaces to machine learning,hidden markov models,numerical libraries (LAPACK,BLAS,GSL),and builtin vector/matrix/tensor engine.

SVMlight -- a popular implementation of the SVM algorithm by Thorsten Joachims; it can be used to solve classification,regression and ranking problems.

LIBSVM-- A Library for Support Vector Machines,Chih-Chung Chang and Chih-Jen Lin

YALE -- a powerful machine learning toolbox containing wrappers for SVMLight,LibSVM,and MySVM in addition to many evaluation and preprocessing methods.

LS-SVMLab - Matlab/C SVM toolbox - well-documented,many features

Gist -- implementation of the SVM algorithm with feature selection.

Weka -- a machine learning toolkit that includes an implementation of an SVM classifier; Weka can be used both interactively though a graphical interface or as a software library. (One of them is called "SMO". In the GUI Weka explorer,it is under the "classify" tab if you "Choose" an algorithm.)

OSU SVM - Matlab implementation based on LIBSVM

Torch - C++ machine learning library with SVMShogun - Large Scale Machine Learning Toolbox with interfaces to Octave,Matlab,Python,R

Spider - Machine learning library for Matlab

kernlab - Kernel-based Machine Learning library for R

TinySVM -- a small SVM implementation,written in C++

R

e1071 - Machine learning library for R

Matlab

SimpleSVM - SimpleSVM toolbox for Matlab

SVM and Kernel Methods Matlab Toolbox

PCP -- C program for supervised pattern classification. Includes LIBSVM wrapper.

python

numpy -fundamental package for scientific computing with Python

scipy -package of tools for science and engineering for Python

主要软件

Lush--anLisp-likeinterpreted/compiledlanguagewithC/C++/FortraninterfacesthathaspackagestointerfacetoanumberofdifferentSVMimplementations.InterfacestoLASVM,LIBSVM,mySVM,SVQP,SVQP2(SVQP3infuture)areavailable.LeveragetheseagainstLush'sotherinterfacestomachinelearning,hiddenmarkovmodels,numericallibraries(LAPACK,BLAS,GSL),andbuiltinvector/matrix/tensorengine.

SVMlight--apopularimplementationoftheSVMalgorithmbyThorstenJoachims;itcanbeusedtosolveclassification,regressionandrankingproblems.

LIBSVM--ALibraryforSupportVectorMachines,Chih-ChungChangandChih-JenLin

YALE--apowerfulmachinelearningtoolboxcontainingwrappersforSVMLight,LibSVM,andMySVMinadditiontomanyevaluationandpreprocessingmethods.

LS-SVMLab-Matlab/CSVMtoolbox-well-documented,manyfeatures

Gist--implementationoftheSVMalgorithmwithfeatureselection.

Weka--amachinelearningtoolkitthatincludesanimplementationofanSVMclassifier;Wekacanbeusedbothinteractivelythoughagraphicalinterfaceorasasoftwarelibrary.(Oneofthemiscalled"SMO".IntheGUIWekaexplorer,itisunderthe"classify"tabifyou"Choose"analgorithm.)

OSUSVM-MatlabimplementationbasedonLIBSVM

Torch-C++machinelearninglibrarywithSVMShogun-LargeScaleMachineLearningToolboxwithinterfacestoOctave,Matlab,Python,R

Spider-MachinelearninglibraryforMatlab

kernlab-Kernel-basedMachineLearninglibraryforR

e1071-MachinelearninglibraryforR

SimpleSVM-SimpleSVMtoolboxforMatlab

SVMandKernelMethodsMatlabToolbox

PCP--Cprogramforsupervisedpatternclassification.IncludesLIBSVMwrapper.

TinySVM--asmallSVMimplementation,writteninC++

相关词条

相关搜索

其它词条