- Support vector machine
Support vector machines (SVMs) are a set of related
supervised learning methods used for classification and regression. Viewing inputdata as two sets ofvector s in an "n"-dimensional space, an SVM will construct a separatinghyperplane in that space, one which maximizes the "margin" between the two data sets. To calculate the margin, twoparallel hyperplanes are constructed, one on each side of the separating hyperplane, which are "pushed up against" the two data sets. Intuitively, a good separation is achieved by the hyperplane that has the largest distance to the neighboring datapoints of both classes, since in general the larger the margin the better thegeneralization error of the classifier.Motivation
Classifying data is a common need in
machine learning .Suppose some given data points each belong to one of two classes, and the goal is to decide which class a "new" data point will be in. In the case of support vector machines, a data point is viewed as a -dimensional vector (a list of numbers), and we want to know whether we can separate such points with a -dimensionalhyperplane . This is called alinear classifier . There are many hyperplanes that might classify the data. However, we are additionally interested in finding out if we can achieve maximum separation (margin) between the two classes. By this we mean that we pick the hyperplane so that the distance from the hyperplane to the nearest data point is maximized. That is to say that the nearest distance between a point in one "separated" hyperplane and a point in the other "separated" hyperplane is maximized. Now, if such a hyperplane exists, it is clearly of interest and is known as the "maximum-margin hyperplane " and such a linear classifier is known as a maximummargin classifier .Formalization
We are given some training data, a set of points of the form:where the "c""i" is either 1 or −1, indicating the class to which the point belongs. Each is a -dimensional real vector. We want to give the maximum-margin hyperplane which divides the points having from those having . Any hyperplane can be written as the set of points satisfying: The vector is a normal vector: it is perpendicular to the hyperplane. The parameter determines the offset of the hyperplane from the origin along the normal vector .
We want to choose the and to maximize the margin, or distance between the parallel hyperplanes that are as far apart as possible while still separating the data. These hyperplanes can be described by the equations: and: Note that if the training data are
linearly separable , we can select the two hyperplanes of the margin in a way that there are no points between them and then try to maximize their distance. By using geometry, we find the distance between these two hyperplanes is , so we want to minimize . As we also have to prevent data points falling into the margin, we add the following constraint: for each either: for for the first class or: for of the second.This can be rewritten as:: We can put this together to get the optimization problem:: choose to minimize : subject toPrimal Form
The optimization problem presented in the preceding section is difficult to solve because it depends on the absolute value of |w|.Fortunately it is possible to alter the equation by substituting ||w|| with without changing the solution (the minimum of the original and the modified equation have the same w and b).This is a
quadratic programming (QP) optimization problem. More clearly,: minimize , subject to .The factor of 1/2 is used for mathematical convenience.This problem can now be solved by standard quadratic programming techniques and programs.Dual Form
Writing the classification rule in its unconstrained dual form reveals that the maximum margin hyperplane and therefore the classification task is only a function of the "support vectors", the training data that lie on the margin.The dual of the SVM can be shown to be:: subject to , and where the terms constitute a dual representation for the weight vector in terms of the training set::
Properties
SVMs belong to a family of generalized
linear classifier s. They can also be considered a special case ofTikhonov regularization . A special property is that they simultaneously minimize the empirical "classification error" and maximize the "geometric margin"; hence they are also known as maximummargin classifier s.A comparison of the SVM to other classifiers has been made by Meyer, Leisch and Hornik. [David Meyer, Friedrich Leisch, and Kurt Hornik. The support vector machine under test. Neurocomputing 55(1-2): 169-186, 2003http://dx.doi.org/10.1016/S0925-2312(03)00431-4]
Extensions to the linear SVM
Soft margin
In
1995 ,Corinna Cortes andVladimir Vapnik suggested a modified maximum margin idea that allows for mislabeled examples. [Corinna Cortes and V. Vapnik, "Support-Vector Networks", Machine Learning, 20, 1995. http://www.springerlink.com/content/k238jx04hm87j80g/] If there exists no hyperplane that can split the "yes" and "no" examples, the "Soft Margin" method will choose a hyperplane that splits the examples as cleanly as possible, while still maximizing the distance to the nearest cleanly split examples. This work popularized the expression "Support Vector Machine" or "SVM". The method introduces slack variables, , which measure the degree of misclassification of the datum : . The objective function is then increased by a function which penalises non-zero , and the optimisation becomes a trade off between a large margin, and a small error penalty. If the penalty function is linear, the equation (3) now transforms to: This constraint in (2) along with the objective of minimizing |"w"| can be solved usingLagrange multipliers . The key advantage of a linear penalty function is that the slack variables vanish from the dual problem, with the constant "C" appearing only as an additional constraint on the Lagrange multipliers. Non-linear penalty functions have been used, particularly to reduce the effect of outliers on the classifier, but unless care is taken, the problem becomes non-convex, and thus it is considerably more difficult to find a global solution.Non-linear classification
The original optimal hyperplane algorithm proposed by
Vladimir Vapnik in1963 was alinear classifier . However, in1992 ,Bernhard Boser ,Isabelle Guyon and Vapnik suggested a way to create non-linear classifiers by applying thekernel trick (originally proposed by Aizerman et al.. [cite journal | author = M. Aizerman, E. Braverman, and L. Rozonoer | year = 1964 | title = Theoretical foundations of the potential function method in pattern recognition learning | journal = Automation and Remote Control | volume = 25 | pages = 821–837] ) to maximum-margin hyperplanes. [B. E. Boser, I. M. Guyon, and V. N. Vapnik. "A training algorithm for optimal margin classifiers". In D. Haussler, editor, 5th Annual ACM Workshop on COLT, pages 144-152, Pittsburgh, PA, 1992. ACM Press] The resulting algorithm is formally similar, except that everydot product is replaced by a non-linear kernel function. This allows the algorithm to fit the maximum-margin hyperplane in the transformed feature space. The transformation may be non-linear and the transformed space high dimensional; thus though the classifier is a hyperplane in the high-dimensional feature space it may be non-linear in the original input space.If the kernel used is a
Gaussian radial basis function , the corresponding feature space is aHilbert space of infinite dimension. Maximum margin classifiers are well regularized, so the infinite dimension does not spoil the results. Some common kernels include,
* Polynomial (homogeneous):
* Polynomial (inhomogeneous):
* Radial Basis Function: , for
* Gaussian Radial basis function:
* Sigmoid: , for some (not every) andMultiClass SVM
Multiclass SVM aims to assign labels to instances by using support vector machine, where the labels are drawnfrom a finite set of several elements . The dominating approach for doing so, is to reduce the single multiclassproblem into multiple binary problems. Each of the problems yields a binary classifier, which is assumed toproduce an output function that gives relatively large values for examples from the positive class and relativelysmall values for examples belonging to the negative class. Two common methods to build such binary classifiersare where each classifier distinguishes between (i) one of the labels to the rest (one-versus-all) or (ii) betweenevery pair of classes (one-versus-one). Classification of new instances for one-versus-all case is done by winner takes-all strategy, in which the classifier with the highest output function assign the class. The classification ofone-versus-one case is done by max-wins voting strategy, in which every classifier assign the instance to one ofthe two classes, then the vote for the assigned class is increased by one vote. Finally the class with most votesdetermines the instance classification
Regression
A version of a SVM for regression was proposed in
1996 byVladimir Vapnik , Harris Drucker, Chris Burges, Linda Kaufman and Alex Smola. [Harris Drucker, Chris J.C. Burges, Linda Kaufman, Alex Smola and Vladimir Vapnik (1997). "Support Vector Regression Machines". "Advances in Neural Information Processing Systems 9, NIPS 1996", 155-161, MIT Press.] This method is calledsupport vector regression (SVR). The model produced by support vector classification (as described above) only depends on a subset of the training data, because the cost function for building the model does not care about training points that lie beyond the margin. Analogously, the model produced by SVR only depends on a subset of the training data, because the cost function for building the model ignores any training data that are close (within a threshold ) to the model prediction.Implementation
The parameters of the maximum-margin hyperplane are derived by solving the optimization. There exist several specialized algorithms for quickly solving the QP problem that arises from SVMs, mostly reliant on heuristics for breaking the problem down into smaller, more-manageable chunks. A common method for solving the QP problem is the [http://research.microsoft.com/users/jplatt/smo.html Platt's]
Sequential Minimal Optimization (SMO)algorithm , which breaks the problem down into 2-dimensional sub-problems that may be solved analytically, eliminating the need for a numerical optimization algorithm such asconjugate gradient methods.Another approach is to use an
interior point method that uses Newton-like iterations to find a solution of theKarush-Kuhn-Tucker conditions of the primal and dual problems. [cite journal | author = M. Ferris, and T. Munson | year = 2002 | title = Interior-point methods for massive support vector machines | journal = SIAM Journal on Optimization | volume = 13 | pages = 783-804] Instead of solving a sequence of broken down problems, this approach directly solves the problem as a whole. To avoid solving a linear system involving the large kernel matrix, a row rank approximation to the matrix is often used to use the kernel trick.ee also
*
Kernel machines
*Predictive analytics
*Relevance Vector Machine , a probabilistic sparse kernel model identical in functional form to SVM.References
Bibliography
* Nello Cristianini and John Shawe-Taylor. "An Introduction to Support Vector Machines and other kernel-based learning methods". Cambridge University Press, 2000. ISBN 0-521-78019-5 "( [http://www.support-vector.net] SVM Book)"
* Huang T.-M., Kecman V., Kopriva I. (2006), Kernel Based Algorithms for Mining Huge Data Sets, Supervised, Semi-supervised, and Unsupervised Learning, Springer-Verlag, Berlin, Heidelberg, 260 pp. 96 illus., Hardcover, ISBN 3-540-31681-7 [http://learning-from-data.com]
* Vojislav Kecman: "Learning and Soft Computing - Support Vector Machines, Neural Networks, Fuzzy Logic Systems", The MIT Press, Cambridge, MA, 2001. [http://www.support-vector.ws]
* Bernhard Schölkopf and A. J. Smola: "Learning with Kernels". MIT Press, Cambridge, MA, 2002. "(Partly available on line: [http://www.learning-with-kernels.org] .)" ISBN 0-262-19475-9
* Bernhard Schölkopf, Christopher J.C. Burges, and Alexander J. Smola (editors). "Advances in Kernel Methods: Support Vector Learning". MIT Press, Cambridge, MA, 1999. ISBN 0-262-19416-3. [http://www.kernel-machines.org/nips97/book.html]
* John Shawe-Taylor and Nello Cristianini. "Kernel Methods for Pattern Analysis". Cambridge University Press, 2004. ISBN 0-521-81397-2 "( [http://www.kernel-methods.net] Kernel Methods Book)"
*P.J. Tan and [http://www.csse.monash.edu.au/~dld D.L. Dowe] (2004), [http://www.csse.monash.edu.au/~dld/David.Dowe.publications.html#TanDowe2004 MML Inference of Oblique Decision Trees] , Lecture Notes in Artificial Intelligence (LNAI) 3339, Springer-Verlag, [http://www.csse.monash.edu.au/~dld/Publications/2004/Tan+DoweAI2004.pdf pp1082-1088] . (This paper usesminimum message length (MML) and actually incorporates probabilistic support vector machines in the leaves ofdecision tree s.)
* Vladimir Vapnik. "The Nature of Statistical Learning Theory". Springer-Verlag, 1995. ISBN 0-387-98780-0
* Vladimir Vapnik, S.Kotz "Estimation of Dependences Based on Empirical Data" Springer, 2006. ISBN 0387308652, 510 pages [this is a reprint of Vapnik's early book describing philosophy behind SVM approach. The 2006 Appendix describes recent development] .
* Dmitriy Fradkin and Ilya Muchnik "Support Vector Machines for Classification" in J. Abello and G. Carmode (Eds) "Discrete Methods in Epidemiology", DIMACS Series in Discrete Mathematics and Theoretical Computer Science, volume 70, pp. 13-20, 2006. [http://paul.rutgers.edu/~dfradkin/papers/svm.pdf] . Succinctly describes theoretical ideas behind SVM.
* Kristin P. Bennett and Colin Campbell, "Support Vector Machines: Hype or Hallelujah?", SIGKDD Explorations, 2,2, 2000, 1-13. [http://www.acm.org/sigs/sigkdd/explorations/issue2-2/bennett.pdf] . Excellent introduction to SVMs with helpful figures.
* Ovidiu Ivanciuc, "Applications of Support Vector Machines in Chemistry", In: "Reviews in Computational Chemistry", Volume 23, 2007, pp. 291–400. Reprint available: [http://www.ivanciuc.org/Files/Reprint/Ivanciuc_SVM_CCR_2007_23_291.pdf]External links
General
* A tutorial on SVMs has been produced by C.J.C Burges. [Christopher J. C. Burges. "A Tutorial on Support Vector Machines for Pattern Recognition". Data Mining and Knowledge Discovery 2:121 - 167, 1998 http://research.microsoft.com/~cburges/papers/SVMTutorial.pdf]
* [http://www.pascal-network.org www.pascal-network.org] "(EU Funded Network on Pattern Analysis, Statistical Modelling and Computational Learning)"
* [http://www.kernel-machines.org www.kernel-machines.org] "(general information and collection of research papers)"
* [http://www.kernel-methods.net www.kernel-methods.net] "(News, Links, Code related to Kernel methods - Academic Site)"
* [http://www.support-vector.net www.support-vector.net] "(News, Links, Code related to Support Vector Machines - Academic Site)"
* [http://www.support-vector-machines.org www.support-vector-machines.org] "(Literature, Review, Software, Links related to Support Vector Machines - Academic Site)"
* [http://www.support-vector.ws www.support-vector.ws] "(Free educational MATLAB based software for SVMs, NN and FL , Links, Publications downloads, Semisupervised learning software SemiL, Links)"
* [http://videolectures.net/Top/Computer_Science/Machine_Learning/Kernel_Methods/Support_Vector_Machines/ videolectures.net] "(SVM-related video lectures)"
* [http://www.youtube.com/watch?v=3liCbRZPrZA Animation clip] : SVM with polynomial kernel visualization.oftware
* [http://www.zementis.com/adapa.htm ADAPA] -- a batch and real-time
PMML based scoring engine for data mining models including Support Vector Machines.
* [http://search.cpan.org/~lairdm/Algorithm-SVM-0.11/lib/Algorithm/SVM.pm Algorithm::SVM] -- Perl bindings for the libsvm Support Vector Machine library
* [http://dclib.sourceforge.net dlib C++ Library] -- A C++ library that includes an easy to use SVM classifier
* [http://cran.r-project.org/src/contrib/Descriptions/e1071.html e1071] - Machine learning library for R
* [http://bioinformatics.ubc.ca/gist/ Gist] -- implementation of the SVM algorithm with feature selection.
* [http://cran.r-project.org/src/contrib/Descriptions/kernlab.html kernlab] - Kernel-based Machine Learning library for R
* [http://www.csie.ntu.edu.tw/~cjlin/liblinear/ LIBLINEAR] -- A Library for Large Linear Classification, Machine Learning Group at National Taiwan University
* [http://www.csie.ntu.edu.tw/~cjlin/libsvm/ LIBSVM] -- A Library for Support Vector Machines, Chih-Chung Chang and Chih-Jen Lin
* [http://lush.sourceforge.net/ Lush] -- a Lisp-like interpreted/compiled language with C/C++/Fortran interfaces that has packages 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.
* [http://www.esat.kuleuven.ac.be/sista/lssvmlab LS-SVMLab] - Matlab/C SVM toolbox - well-documented, many features
* [https://mlpy.fbk.eu mlpy] - Machine Learning Py - Python/NumPy based package for machine learning.
* [http://sourceforge.net/projects/svm/ OSU SVM] - Matlab implementation based on LIBSVM
* [http://www.procoders.net pcSVM] is an object oriented SVM framework written in C++ and provides wrapping to Python classes. The site provides a stand alone [http://www.procoders.net/?p=22 demo tool] for experimenting with SVMs.
* [http://pcp.sourceforge.net/ PCP] -- C program for supervised pattern classification. Includes LIBSVM wrapper.
* [http://pyml.sourceforge.net PyML] -- a Python machine learning package. Includes: SVM, nearest neighbor classifiers, ridge regression, Multi-class methods (one-against-one and one-against-rest), Feature selection (filter methods, RFE, multiplicative update, Model selection, Classifier testing (cross-validation, error rates, ROC curves, statistical test for comparing classifiers).
* [http://www.shogun-toolbox.org Shogun] - Large Scale Machine Learning Toolbox that provides several SVM implementations (like libSVM, SVMlight) under a common framework and interfaces to Octave, Matlab, Python, R
* [http://asi.insa-rouen.fr/~gloosli/simpleSVM.html SimpleSVM] - SimpleSVM toolbox for Matlab
* [http://www.kyb.tuebingen.mpg.de/bs/people/spider/ Spider] - Machine learning library for Matlab
* [http://cmp.felk.cvut.cz/cmp/software/stprtool/ Statistical Pattern Recognition Toolbox for Matlab] .
* [http://asi.insa-rouen.fr/~arakotom/toolbox/index.html SVM and Kernel Methods Matlab Toolbox]
* [http://www.patternrecognition.co.za/applet.html SVM Classification Applet] -- Performs classification on any given data set and gives 10-fold cross-validation error rate
* [http://svmlight.joachims.org/ SVMlight] -- a popular implementation of the SVM algorithm by Thorsten Joachims; it can be used to solve classification, regression and ranking problems.
** [http://cfn.upenn.edu/aguirre/wiki/support_vector_machines automation of SVMlight in Matlab] -- complete automation of SVMlight for use with fMRI data
* [http://jing.cz3.nus.edu.sg/cgi-bin/svmprot.cgi/ SVMProt] -- Protein Functional Family Prediction.
* [http://www.torch.ch/ Torch] - C++ machine learning library with SVM
* [http://www.terborg.net/research/kml/ The Kernel-Machine Library] (GNU) C++ template library for Support Vector Machines
* [http://chasen.org/~taku/software/TinySVM/ TinySVM] -- a small SVM implementation, written in C++
* [http://rapid-i.com/content/blogcategory/10/69/ YALE] (nowRapidMiner ) -- a powerful machine learning toolbox containing wrappers for SVMLight, LibSVM, and MySVM in addition to many evaluation and preprocessing methods.
* 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. (The SVM implementation is called "SMO". It can be found in the Weka Explorer GUI, under the "functions" category or in the Weka Explorer GUI as SVMAttributeEval, under Select attributes, attributeSelection.)Interactive SVM applications
* [http://mips.gsf.de/proj/est/ ECLAT] classification of
Expressed Sequence Tag (EST) from mixed EST pools using codon usage
* [http://mips.gsf.de/proj/este/ EST3] classification ofExpressed Sequence Tag (EST) from mixed EST pools using nucleotide triples
Wikimedia Foundation. 2010.