Support vector machine explained

In machine learning, support vector machines (SVMs, also support vector networks) are supervised max-margin models with associated learning algorithms that analyze data for classification and regression analysis. Developed at AT&T Bell Laboratories by Vladimir Vapnik with colleagues (Boser et al., 1992, Guyon et al., 1993, Cortes and Vapnik, 1995, Vapnik et al., 1997[1]) SVMs are one of the most studied models, being based on statistical learning frameworks of VC theory proposed by Vapnik (1982, 1995) and Chervonenkis (1974).

In addition to performing linear classification, SVMs can efficiently perform a non-linear classification using what is called the kernel trick, representing the data only through a set of pairwise similarity comparisons between the original data points using a kernel function, which transforms them into coordinates in the higher dimensional feature space. Thus, SVMs use the kernel trick to implicitly map their inputs into high-dimensional feature spaces where linear classification can be performed.[2] Being max-margin models, SVMs are resilient to noisy data (for example, mis-classified examples). SVMs can also be used for regression tasks, where the objective becomes

\epsilon

-sensitive.

The support vector clustering[3] algorithm, created by Hava Siegelmann and Vladimir Vapnik, applies the statistics of support vectors, developed in the support vector machines algorithm, to categorize unlabeled data. These data sets require unsupervised learning approaches, which attempt to find natural clustering of the data to groups and, then, to map new data according to these clusters.

The popularity of SVMs is likely due to their amenability to theoretical analysis, their flexibility in being applied to a wide variety of tasks, including structured prediction problems. It is not clear that SVMs have better predictive performance than other linear models, such as logistic regression and linear regression.

Motivation

Classifying data is a common task 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

p

-dimensional vector (a list of

p

numbers), and we want to know whether we can separate such points with a

(p-1)

-dimensional hyperplane. This is called a linear classifier. There are many hyperplanes that might classify the data. One reasonable choice as the best hyperplane is the one that represents the largest separation, or margin, between the two classes. So we choose the hyperplane so that the distance from it to the nearest data point on each side is maximized. If such a hyperplane exists, it is known as the maximum-margin hyperplane and the linear classifier it defines is known as a maximum-margin classifier; or equivalently, the perceptron of optimal stability.

More formally, a support vector machine constructs a hyperplane or set of hyperplanes in a high or infinite-dimensional space, which can be used for classification, regression, or other tasks like outliers detection.[4] Intuitively, a good separation is achieved by the hyperplane that has the largest distance to the nearest training-data point of any class (so-called functional margin), since in general the larger the margin, the lower the generalization error of the classifier.[5] A lower generalization error means that the implementer is less likely to experience overfitting.

k(x,y)

selected to suit the problem.[6] The hyperplanes in the higher-dimensional space are defined as the set of points whose dot product with a vector in that space is constant, where such a set of vectors is an orthogonal (and thus minimal) set of vectors that defines a hyperplane. The vectors defining the hyperplanes can be chosen to be linear combinations with parameters

\alphai

of images of feature vectors

xi

that occur in the data base. With this choice of a hyperplane, the points

x

in the feature space that are mapped into the hyperplane are defined by the relation

style\sumi\alphaik(xi,x)=constant.

Note that if

k(x,y)

becomes small as

y

grows further away from

x

, each term in the sum measures the degree of closeness of the test point

x

to the corresponding data base point

xi

. In this way, the sum of kernels above can be used to measure the relative nearness of each test point to the data points originating in one or the other of the sets to be discriminated. Note the fact that the set of points

x

mapped into any hyperplane can be quite convoluted as a result, allowing much more complex discrimination between sets that are not convex at all in the original space.

Applications

SVMs can be used to solve various real-world problems:

History

The original SVM algorithm was invented by Vladimir N. Vapnik and Alexey Ya. Chervonenkis in 1964. In 1992, Bernhard Boser, Isabelle Guyon and Vladimir Vapnik suggested a way to create nonlinear classifiers by applying the kernel trick to maximum-margin hyperplanes.[17] The "soft margin" incarnation, as is commonly used in software packages, was proposed by Corinna Cortes and Vapnik in 1993 and published in 1995.[18]

Linear SVM

We are given a training dataset of

n

points of the form (\mathbf_1, y_1), \ldots, (\mathbf_n, y_n),where the

yi

are either 1 or −1, each indicating the class to which the point

xi

belongs. Each

xi

is a

p

-dimensional real vector. We want to find the "maximum-margin hyperplane" that divides the group of points

xi

for which

yi=1

from the group of points for which

yi=-1

, which is defined so that the distance between the hyperplane and the nearest point

xi

from either group is maximized.

Any hyperplane can be written as the set of points

x

satisfying\mathbf^\mathsf \mathbf - b = 0,where

w

is the (not necessarily normalized) normal vector to the hyperplane. This is much like Hesse normal form, except that

w

is not necessarily a unit vector. The parameter

\tfrac{b}{\|w\|}

determines the offset of the hyperplane from the origin along the normal vector

w

.

Warning: most of the literature on the subject defines the bias so that\mathbf^\mathsf \mathbf + b = 0.

Hard-margin

If the training data is linearly separable, we can select two parallel hyperplanes that separate the two classes of data, so that the distance between them is as large as possible. The region bounded by these two hyperplanes is called the "margin", and the maximum-margin hyperplane is the hyperplane that lies halfway between them. With a normalized or standardized dataset, these hyperplanes can be described by the equations

wTx-b=1

(anything on or above this boundary is of one class, with label 1)and

wTx-b=-1

(anything on or below this boundary is of the other class, with label −1).Geometrically, the distance between these two hyperplanes is

\tfrac{2}{\|w\|}

,[19] so to maximize the distance between the planes we want to minimize

\|w\|

. The distance is computed using the distance from a point to a plane equation. We also have to prevent data points from falling into the margin, we add the following constraint: for each

i

either\mathbf^\mathsf \mathbf_i - b \ge 1 \,, \text y_i = 1,or\mathbf^\mathsf \mathbf_i - b \le -1 \,, \text y_i = -1.These constraints state that each data point must lie on the correct side of the margin.

This can be rewritten asWe can put this together to get the optimization problem:

\begin{align} &\underset{w,b}{\operatorname{minimize}}&&

2\\ &subjectto
\|w\|
2

&&

\top
y
i(w

xi-b)\geq1\foralli\in\{1,...,n\} \end{align}

The

w

and

b

that solve this problem determine the final classifier,

x\mapstosgn(wTx-b)

, where

sgn()

is the sign function.

An important consequence of this geometric description is that the max-margin hyperplane is completely determined by those

xi

that lie nearest to it (explained below). These

xi

are called support vectors.

Soft-margin

To extend SVM to cases in which the data are not linearly separable, the hinge loss function is helpful\max\left(0, 1 - y_i(\mathbf^\mathsf \mathbf_i - b)\right).

Note that

yi

is the i-th target (i.e., in this case, 1 or −1), and

wTxi-b

is the i-th output.

This function is zero if the constraint in is satisfied, in other words, if

xi

lies on the correct side of the margin. For data on the wrong side of the margin, the function's value is proportional to the distance from the margin.

The goal of the optimization then is to minimize:

\lVert \mathbf \rVert^2 + C \left[\frac 1 n \sum_{i=1}^n \max\left(0, 1 - y_i(\mathbf{w}^\mathsf{T} \mathbf{x}_i - b)\right) \right],

where the parameter

C>0

determines the trade-off between increasing the margin size and ensuring that the

xi

lie on the correct side of the margin (Note we can add a weight to either term in the equation above). By deconstructing the hinge loss, this optimization problem can be massaged into the following:

\begin&\underset &&\|\mathbf\|_2^2 + C\sum_^n \zeta_i\\&\text && y_i(\mathbf^\top \mathbf_i - b) \geq 1 - \zeta_i, \quad \zeta_i \geq 0 \quad \forall i\in \\end

Thus, for large values of

C

, it will behave similar to the hard-margin SVM, if the input data are linearly classifiable, but will still learn if a classification rule is viable or not.

Nonlinear kernels

The original maximum-margin hyperplane algorithm proposed by Vapnik in 1963 constructed a linear classifier. However, in 1992, Bernhard Boser, Isabelle Guyon and Vladimir Vapnik suggested a way to create nonlinear classifiers by applying the kernel trick (originally proposed by Aizerman et al.[20]) to maximum-margin hyperplanes. The kernel trick, where dot products are replaced by kernels, is easily derived in the dual representation of the SVM problem. This allows the algorithm to fit the maximum-margin hyperplane in a transformed feature space. The transformation may be nonlinear and the transformed space high-dimensional; although the classifier is a hyperplane in the transformed feature space, it may be nonlinear in the original input space.

It is noteworthy that working in a higher-dimensional feature space increases the generalization error of support vector machines, although given enough samples the algorithm still performs well.[21]

Some common kernels include:

k(xi,xj)=(xi

d
x
j)
. Particularly, when

d=1

, this becomes the linear kernel.

k(xi,xj)=(xixj+r)d

.

k(xi,xj)=\exp\left(-\gamma\left\|xi-

2\right)
x
j\right\|
for

\gamma>0

. Sometimes parametrized using

\gamma=1/(2\sigma2)

.
k(xi,
xj)

=\tanh(\kappaxixj+c)

for some (not every)

\kappa>0

and

c<0

.

The kernel is related to the transform

\varphi(xi)

by the equation

k(xi,xj)=\varphi(xi)

\varphi(xj)
. The value is also in the transformed space, with \mathbf = \sum_i \alpha_i y_i \varphi(\mathbf_i). Dot products with for classification can again be computed by the kernel trick, i.e. \mathbf \cdot \varphi(\mathbf) = \sum_i \alpha_i y_i k(\mathbf_i, \mathbf).

Computing the SVM classifier

Computing the (soft-margin) SVM classifier amounts to minimizing an expression of the form

We focus on the soft-margin classifier since, as noted above, choosing a sufficiently small value for

λ

yields the hard-margin classifier for linearly classifiable input data. The classical approach, which involves reducing to a quadratic programming problem, is detailed below. Then, more recent approaches such as sub-gradient descent and coordinate descent will be discussed.

Primal

Minimizing can be rewritten as a constrained optimization problem with a differentiable objective function in the following way.

For each

i\in\{1,\ldots,n\}

we introduce a variable

\zetai=max\left(0,1-

T
y
i(w

xi-b)\right)

. Note that

\zetai

is the smallest nonnegative number satisfying
T
y
i(w

xi-b)\geq1-\zetai.

Thus we can rewrite the optimization problem as follows

\begin&\text \frac 1 n \sum_^n \zeta_i + \lambda \|\mathbf\|^2 \\[0.5ex]&\text y_i\left(\mathbf^\mathsf \mathbf_i - b\right) \geq 1 - \zeta_i \, \text \, \zeta_i \geq 0,\, \text i.\end

This is called the primal problem.

Dual

By solving for the Lagrangian dual of the above problem, one obtains the simplified problem

\begin&\text\,\, f(c_1 \ldots c_n) = \sum_^n c_i - \frac 1 2 \sum_^n\sum_^n y_i c_i(\mathbf_i^\mathsf \mathbf_j)y_j c_j, \\&\text \sum_^n c_iy_i = 0,\,\text 0 \leq c_i \leq \frac\;\texti.\end

This is called the dual problem. Since the dual maximization problem is a quadratic function of the

ci

subject to linear constraints, it is efficiently solvable by quadratic programming algorithms.

Here, the variables

ci

are defined such that

\mathbf = \sum_^n c_iy_i \mathbf_i.

Moreover,

ci=0

exactly when

xi

lies on the correct side of the margin, and

0<ci<(2nλ)-1

when

xi

lies on the margin's boundary. It follows that

w

can be written as a linear combination of the support vectors.

The offset,

b

, can be recovered by finding an

xi

on the margin's boundary and solving y_i(\mathbf^\mathsf \mathbf_i - b) = 1 \iff b = \mathbf^\mathsf \mathbf_i - y_i .

(Note that

-1
y
i

=yi

since

yi=\pm1

.)

Kernel trick

See main article: Kernel method.

Suppose now that we would like to learn a nonlinear classification rule which corresponds to a linear classification rule for the transformed data points

\varphi(xi).

Moreover, we are given a kernel function

k

which satisfies

k(xi,xj)=\varphi(xi)\varphi(xj)

.

We know the classification vector

w

in the transformed space satisfies

\mathbf = \sum_^n c_iy_i\varphi(\mathbf_i),

where, the

ci

are obtained by solving the optimization problem

\begin\text\,\, f(c_1 \ldots c_n) &= \sum_^n c_i - \frac 1 2 \sum_^n\sum_^n y_ic_i(\varphi(\mathbf_i) \cdot \varphi(\mathbf_j))y_jc_j \\ &= \sum_^n c_i - \frac 1 2 \sum_^n\sum_^n y_ic_ik(\mathbf_i, \mathbf_j)y_jc_j \\\text \sum_^n c_i y_i &= 0,\,\text 0 \leq c_i \leq \frac\;\texti.\end

The coefficients

ci

can be solved for using quadratic programming, as before. Again, we can find some index

i

such that

0<ci<(2nλ)-1

, so that

\varphi(xi)

lies on the boundary of the margin in the transformed space, and then solve

\beginb = \mathbf^\mathsf \varphi(\mathbf_i) - y_i &= \left[\sum_{j=1}^n c_jy_j\varphi(\mathbf{x}_j) \cdot \varphi(\mathbf{x}_i)\right] - y_i \\ &= \left[\sum_{j=1}^n c_jy_jk(\mathbf{x}_j, \mathbf{x}_i)\right] - y_i.\end

Finally,

\mathbf \mapsto \sgn(\mathbf^\mathsf \varphi(\mathbf) - b) = \sgn \left(\left[\sum_{i=1}^n c_iy_ik(\mathbf{x}_i, \mathbf{z})\right] - b\right).

Modern methods

Recent algorithms for finding the SVM classifier include sub-gradient descent and coordinate descent. Both techniques have proven to offer significant advantages over the traditional approach when dealing with large, sparse datasets—sub-gradient methods are especially efficient when there are many training examples, and coordinate descent when the dimension of the feature space is high.

Sub-gradient descent

Sub-gradient descent algorithms for the SVM work directly with the expression

f(\mathbf, b) = \left[\frac 1 n \sum_{i=1}^n \max\left(0, 1 - y_i(\mathbf{w}^\mathsf{T} \mathbf{x}_i - b)\right) \right] + \lambda \|\mathbf\|^2.

Note that

f

is a convex function of

w

and

b

. As such, traditional gradient descent (or SGD) methods can be adapted, where instead of taking a step in the direction of the function's gradient, a step is taken in the direction of a vector selected from the function's sub-gradient. This approach has the advantage that, for certain implementations, the number of iterations does not scale with

n

, the number of data points.[22]

Coordinate descent

Coordinate descent algorithms for the SVM work from the dual problem

\begin&\text\,\, f(c_1 \ldots c_n) = \sum_^n c_i - \frac 1 2 \sum_^n\sum_^n y_i c_i(x_i \cdot x_j)y_j c_j,\\&\text \sum_^n c_iy_i = 0,\,\text 0 \leq c_i \leq \frac\;\texti.\end

For each

i\in\{1,\ldots,n\}

, iteratively, the coefficient

ci

is adjusted in the direction of

\partialf/\partialci

. Then, the resulting vector of coefficients

(c1',\ldots,cn')

is projected onto the nearest vector of coefficients that satisfies the given constraints. (Typically Euclidean distances are used.) The process is then repeated until a near-optimal vector of coefficients is obtained. The resulting algorithm is extremely fast in practice, although few performance guarantees have been proven.[23]

Empirical risk minimization

The soft-margin support vector machine described above is an example of an empirical risk minimization (ERM) algorithm for the hinge loss. Seen this way, support vector machines belong to a natural class of algorithms for statistical inference, and many of its unique features are due to the behavior of the hinge loss. This perspective can provide further insight into how and why SVMs work, and allow us to better analyze their statistical properties.

Risk minimization

In supervised learning, one is given a set of training examples

X1\ldotsXn

with labels

y1\ldotsyn

, and wishes to predict

yn+1

given

Xn+1

. To do so one forms a hypothesis,

f

, such that

f(Xn+1)

is a "good" approximation of

yn+1

. A "good" approximation is usually defined with the help of a loss function,

\ell(y,z)

, which characterizes how bad

z

is as a prediction of

y

. We would then like to choose a hypothesis that minimizes the expected risk:

\varepsilon(f) = \mathbb\left[\ell(y_{n+1}, f(X_{n+1})) \right].

In most cases, we don't know the joint distribution of

Xn+1,yn+1

outright. In these cases, a common strategy is to choose the hypothesis that minimizes the empirical risk:

\hat \varepsilon(f) = \frac 1 n \sum_^n \ell(y_k, f(X_k)).

Under certain assumptions about the sequence of random variables

Xk,yk

(for example, that they are generated by a finite Markov process), if the set of hypotheses being considered is small enough, the minimizer of the empirical risk will closely approximate the minimizer of the expected risk as

n

grows large. This approach is called empirical risk minimization, or ERM.

Regularization and stability

In order for the minimization problem to have a well-defined solution, we have to place constraints on the set

l{H}

of hypotheses being considered. If

l{H}

is a normed space (as is the case for SVM), a particularly effective technique is to consider only those hypotheses

f

for which

\lVertf\rVertlH<k

. This is equivalent to imposing a regularization penalty

lR(f)=λk\lVertf\rVertlH

, and solving the new optimization problem

\hat f = \mathrm\min_ \hat \varepsilon(f) + \mathcal(f).

This approach is called Tikhonov regularization.

More generally,

l{R}(f)

can be some measure of the complexity of the hypothesis

f

, so that simpler hypotheses are preferred.

SVM and the hinge loss

Recall that the (soft-margin) SVM classifier

\hatw,b:x\mapstosgn(\hatwTx-b)

is chosen to minimize the following expression:

\left[\frac 1 n \sum_{i=1}^n \max\left(0, 1 - y_i(\mathbf{w}^\mathsf{T} \mathbf{x} - b)\right) \right] + \lambda \|\mathbf\|^2.

In light of the above discussion, we see that the SVM technique is equivalent to empirical risk minimization with Tikhonov regularization, where in this case the loss function is the hinge loss

\ell(y,z) = \max\left(0, 1 - yz \right).

From this perspective, SVM is closely related to other fundamental classification algorithms such as regularized least-squares and logistic regression. The difference between the three lies in the choice of loss function: regularized least-squares amounts to empirical risk minimization with the square-loss,

\ellsq(y,z)=(y-z)2

; logistic regression employs the log-loss,

\ell_(y,z) = \ln(1 + e^).

Target functions

The difference between the hinge loss and these other loss functions is best stated in terms of target functions - the function that minimizes expected risk for a given pair of random variables

X,y

.

In particular, let

yx

denote

y

conditional on the event that

X=x

. In the classification setting, we have:

y_x = \begin 1 & \text p_x \\ -1 & \text 1-p_x \end

The optimal classifier is therefore:

f^*(x) = \begin1 & \textp_x \geq 1/2 \\ -1 & \text\end

For the square-loss, the target function is the conditional expectation function,

fsq(x)=E\left[yx\right]

; For the logistic loss, it's the logit function,

flog(x)=ln\left(px/({1-px})\right)

. While both of these target functions yield the correct classifier, as

sgn(fsq)=sgn(flog)=f*

, they give us more information than we need. In fact, they give us enough information to completely describe the distribution of

yx

.

On the other hand, one can check that the target function for the hinge loss is exactly

f*

. Thus, in a sufficiently rich hypothesis space—or equivalently, for an appropriately chosen kernel—the SVM classifier will converge to the simplest function (in terms of

l{R}

) that correctly classifies the data. This extends the geometric interpretation of SVM—for linear classification, the empirical risk is minimized by any function whose margins lie between the support vectors, and the simplest of these is the max-margin classifier.[24]

Properties

SVMs belong to a family of generalized linear classifiers and can be interpreted as an extension of the perceptron.[25] They can also be considered a special case of Tikhonov regularization. A special property is that they simultaneously minimize the empirical classification error and maximize the geometric margin; hence they are also known as maximum margin classifiers.

A comparison of the SVM to other classifiers has been made by Meyer, Leisch and Hornik.[26]

Parameter selection

The effectiveness of SVM depends on the selection of kernel, the kernel's parameters, and soft margin parameter

λ

.A common choice is a Gaussian kernel, which has a single parameter

\gamma

. The best combination of

λ

and

\gamma

is often selected by a grid search with exponentially growing sequences of

λ

and

\gamma

, for example,

λ\in\{2-5,2-3,...,213,215\}

;

\gamma\in\{2-15,2-13,...,21,23\}

. Typically, each combination of parameter choices is checked using cross validation, and the parameters with best cross-validation accuracy are picked. Alternatively, recent work in Bayesian optimization can be used to select

λ

and

\gamma

, often requiring the evaluation of far fewer parameter combinations than grid search. The final model, which is used for testing and for classifying new data, is then trained on the whole training set using the selected parameters.[27]

Issues

Potential drawbacks of the SVM include the following aspects:

Extensions

Multiclass SVM

Multiclass SVM aims to assign labels to instances by using support vector machines, where the labels are drawn from a finite set of several elements.

The dominant approach for doing so is to reduce the single multiclass problem into multiple binary classification problems.[28] Common methods for such reduction include:[29]

Crammer and Singer proposed a multiclass SVM method which casts the multiclass classification problem into a single optimization problem, rather than decomposing it into multiple binary classification problems.[32] See also Lee, Lin and Wahba[33] [34] and Van den Burg and Groenen.[35]

Transductive support vector machines

Transductive support vector machines extend SVMs in that they could also treat partially labeled data in semi-supervised learning by following the principles of transduction. Here, in addition to the training set

l{D}

, the learner is also given a set

\mathcal^\star = \_^k

of test examples to be classified. Formally, a transductive support vector machine is defined by the following primal optimization problem:[36]

Minimize (in

w,b,y\star

)

\frac\|\mathbf\|^2

subject to (for any

i=1,...,n

and any

j=1,...,k

)

\begin&y_i(\mathbf \cdot \mathbf_i - b) \ge 1, \\&y^\star_j(\mathbf \cdot \mathbf^\star_j - b) \ge 1,\end

and

y^\star_j \in \.

Transductive support vector machines were introduced by Vladimir N. Vapnik in 1998.

Structured SVM

See main article: structured SVM. Structured support-vector machine is an extension of the traditional SVM model. While the SVM model is primarily designed for binary classification, multiclass classification, and regression tasks, structured SVM broadens its application to handle general structured output labels, for example parse trees, classification with taxonomies, sequence alignment and many more.[37]

Regression

A version of SVM for regression was proposed in 1996 by Vladimir N. Vapnik, Harris Drucker, Christopher J. C. Burges, Linda Kaufman and Alexander J. Smola.[38] This method is called support vector regression (SVR). The model produced by support vector classification (as described above) depends only 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 depends only on a subset of the training data, because the cost function for building the model ignores any training data close to the model prediction. Another SVM version known as least-squares support vector machine (LS-SVM) has been proposed by Suykens and Vandewalle.[39]

Training the original SVR means solving[40]

minimize

\tfrac{1}{2}\|w\|2

subject to

|yi-\langlew,xi\rangle-b|\le\varepsilon

where

xi

is a training sample with target value

yi

. The inner product plus intercept

\langlew,xi\rangle+b

is the prediction for that sample, and

\varepsilon

is a free parameter that serves as a threshold: all predictions have to be within an

\varepsilon

range of the true predictions. Slack variables are usually added into the above to allow for errors and to allow approximation in the case the above problem is infeasible.

Bayesian SVM

In 2011 it was shown by Polson and Scott that the SVM admits a Bayesian interpretation through the technique of data augmentation.[41] In this approach the SVM is viewed as a graphical model (where the parameters are connected via probability distributions). This extended view allows the application of Bayesian techniques to SVMs, such as flexible feature modeling, automatic hyperparameter tuning, and predictive uncertainty quantification. Recently, a scalable version of the Bayesian SVM was developed by Florian Wenzel, enabling the application of Bayesian SVMs to big data.[42] Florian Wenzel developed two different versions, a variational inference (VI) scheme for the Bayesian kernel support vector machine (SVM) and a stochastic version (SVI) for the linear Bayesian SVM.[43]

Implementation

The parameters of the maximum-margin hyperplane are derived by solving the optimization. There exist several specialized algorithms for quickly solving the quadratic programming (QP) problem that arises from SVMs, mostly relying on heuristics for breaking the problem down into smaller, more manageable chunks.

Another approach is to use an interior-point method that uses Newton-like iterations to find a solution of the Karush–Kuhn–Tucker conditions of the primal and dual problems.[44] Instead of solving a sequence of broken-down problems, this approach directly solves the problem altogether. To avoid solving a linear system involving the large kernel matrix, a low-rank approximation to the matrix is often used in the kernel trick.

Another common method is Platt's sequential minimal optimization (SMO) algorithm, which breaks the problem down into 2-dimensional sub-problems that are solved analytically, eliminating the need for a numerical optimization algorithm and matrix storage. This algorithm is conceptually simple, easy to implement, generally faster, and has better scaling properties for difficult SVM problems.[45]

The special case of linear support vector machines can be solved more efficiently by the same kind of algorithms used to optimize its close cousin, logistic regression; this class of algorithms includes sub-gradient descent (e.g., PEGASOS[46]) and coordinate descent (e.g., LIBLINEAR[47]). LIBLINEAR has some attractive training-time properties. Each convergence iteration takes time linear in the time taken to read the train data, and the iterations also have a Q-linear convergence property, making the algorithm extremely fast.

The general kernel SVMs can also be solved more efficiently using sub-gradient descent (e.g. P-packSVM[48]), especially when parallelization is allowed.

Kernel SVMs are available in many machine-learning toolkits, including LIBSVM, MATLAB, SAS, SVMlight, kernlab, scikit-learn, Shogun, Weka, Shark, JKernelMachines, OpenCV and others.

Preprocessing of data (standardization) is highly recommended to enhance accuracy of classification.[49] There are a few methods of standardization, such as min-max, normalization by decimal scaling, Z-score.[50] Subtraction of mean and division by variance of each feature is usually used for SVM.[51]

See also

Further reading

External links

Notes and References

  1. Book: Vapnik, Vladimir N. . 1997 . Gerstner . Wulfram . Germond . Alain . Hasler . Martin . Nicoud . Jean-Daniel . The Support Vector method . https://link.springer.com/chapter/10.1007/BFb0020166 . Artificial Neural Networks — ICANN'97 . Lecture Notes in Computer Science . 1327 . en . Berlin, Heidelberg . Springer . 261–271 . 10.1007/BFb0020166 . 978-3-540-69620-9.
  2. Book: Awad. Mariette. Khanna. Rahul. Efficient Learning Machines. Support Vector Machines for Classification. 39–66. 10.1007/978-1-4302-5990-9_3. free. Apress. 978-1-4302-5990-9. 2015.
  3. Ben-Hur . Asa . Horn . David . Siegelmann . Hava . Vapnik . Vladimir N. . "Support vector clustering" (2001); . Journal of Machine Learning Research . 2 . 125–137.
  4. Web site: 1.4. Support Vector Machines — scikit-learn 0.20.2 documentation . 2017-11-08 . live . https://web.archive.org/web/20171108151644/http://scikit-learn.org/stable/modules/svm.html . 2017-11-08 .
  5. Book: Trevor . Hastie . Trevor Hastie . Robert . Tibshirani . Robert Tibshirani . Jerome . Friedman . Jerome H. Friedman . The Elements of Statistical Learning : Data Mining, Inference, and Prediction . New York . Springer . Second . 2008 . 134 .
  6. Book: Press . William H. . Teukolsky . Saul A. . Vetterling . William T. . Flannery . Brian P. . 2007 . Numerical Recipes: The Art of Scientific Computing . 3rd . Cambridge University Press . New York . 978-0-521-88068-8 . Section 16.5. Support Vector Machines . http://apps.nrbook.com/empanel/index.html#pg=883 . live . https://web.archive.org/web/20110811154417/http://apps.nrbook.com/empanel/index.html#pg=883 . 2011-08-11 .
  7. Book: Joachims . Thorsten . Machine Learning: ECML-98 . Text categorization with Support Vector Machines: Learning with many relevant features . 1398 . 1998 . 137–142 . 10.1007/BFb0026683 . 978-3-540-64417-0 . Springer . en. Lecture Notes in Computer Science . free .
  8. Pradhan . Sameer S. . et al. . 2 May 2004 . Shallow Semantic Parsing using Support Vector Machines . Proceedings of the Human Language Technology Conference of the North American Chapter of the Association for Computational Linguistics: HLT-NAACL 2004 . Association for Computational Linguistics . 233–240.
  9. Vapnik, Vladimir N.: Invited Speaker. IPMU Information Processing and Management 2014).
  10. Book: https://pdfs.semanticscholar.org/917f/15d33d32062bffeb6401eee9fe71d16d6a84.pdf . 4154772 . 10.1007/978-3-319-16829-6_12 . Spatial-Taxon Information Granules as Used in Iterative Fuzzy-Decision-Making for Image Segmentation . Granular Computing and Decision-Making . Studies in Big Data . 2015 . Barghout . Lauren . 10 . 285–318 . 978-3-319-16828-9 . 2018-01-08 . 2018-01-08 . https://web.archive.org/web/20180108120422/https://pdfs.semanticscholar.org/917f/15d33d32062bffeb6401eee9fe71d16d6a84.pdf . dead .
  11. A. Maity . Supervised Classification of RADARSAT-2 Polarimetric Data for Different Land Features. 2016. 1608.00501. cs.CV.
  12. DeCoste . Dennis . 2002 . Training Invariant Support Vector Machines . Machine Learning . 46 . 161–190 . 10.1023/A:1012454411458 . 85843 . free .
  13. Book: Maitra. D. S.. Bhattacharya. U.. Parui. S. K.. 2015 13th International Conference on Document Analysis and Recognition (ICDAR) . CNN based common approach to handwritten character recognition of multiple scripts . August 2015. https://ieeexplore.ieee.org/document/7333916. 1021–1025. 10.1109/ICDAR.2015.7333916. 978-1-4799-1805-8. 25739012.
  14. 3767485 . 2013 . Gaonkar . B. . Davatzikos . C. . Analytic estimation of statistical significance maps for support vector machine based multi-variate image analysis and classification . NeuroImage . 78 . 270–283 . 10.1016/j.neuroimage.2013.03.066 . 23583748 .
  15. Spatial regularization of SVM for the detection of diffusion alterations associated with stroke outcome . dead . 10.1016/j.media.2011.05.007 . 2011 . Cuingnet . Rémi . Rosso . Charlotte . Chupin . Marie . Lehéricy . Stéphane . Dormont . Didier . Benali . Habib . Samson . Yves . Colliot . Olivier . Medical Image Analysis . 15 . 5 . 729–737 . 21752695 . 2018-01-08 . 2018-12-22 . https://web.archive.org/web/20181222172844/http://www.aramislab.fr/perso/colliot/files/media2011_remi_published.pdf .
  16. Statnikov, Alexander; Hardin, Douglas; & Aliferis, Constantin; (2006); "Using SVM weight-based methods to identify causally relevant and non-causally relevant variables", Sign, 1, 4.
  17. Book: 10.1145/130385.130401 . A training algorithm for optimal margin classifiers . Proceedings of the fifth annual workshop on Computational learning theory – COLT '92 . 144 . 1992 . Boser . Bernhard E. . Guyon . Isabelle M. . Vapnik . Vladimir N. . 978-0897914970 . 10.1.1.21.3818 . 207165665 . http://www.clopinet.com/isabelle/Papers/colt92.ps.Z .
  18. Cortes . Corinna . Corinna Cortes . Vapnik . Vladimir . Vladimir Vapnik . 1995 . Support-vector networks . . 20 . 3 . 273–297 . 10.1007/BF00994018 . free . 10.1.1.15.9362 . 206787478 .
  19. Web site: Why is the SVM margin equal to
    2
    \|w\|
    . 30 May 2015 . Mathematics Stack Exchange.
  20. Aizerman . Mark A. . Braverman . Emmanuel M. . Rozonoer . Lev I. . amp . 1964 . Theoretical foundations of the potential function method in pattern recognition learning . Automation and Remote Control . 25 . 821–837 .
  21. Jin . Chi . Wang . Liwei . Dimensionality dependent PAC-Bayes margin bound . Advances in Neural Information Processing Systems . 2012 . live . https://web.archive.org/web/20150402185336/http://papers.nips.cc/paper/4500-dimensionality-dependent-pac-bayes-margin-bound . 2015-04-02 . 10.1.1.420.3487 .
  22. Pegasos: primal estimated sub-gradient solver for SVM . Mathematical Programming . 2010-10-16 . 0025-5610 . 3–30 . 127 . 1 . 10.1007/s10107-010-0420-4 . Shai . Shalev-Shwartz . Yoram . Singer . Nathan . Srebro . Andrew . Cotter . 10.1.1.161.9629 . 53306004 .
  23. Book: ACM . 2008-01-01 . New York, NY, USA . 978-1-60558-205-4 . 408–415 . 10.1145/1390156.1390208 . Cho-Jui . Hsieh . Kai-Wei . Chang . Chih-Jen . Lin . S. Sathiya . Keerthi . S. . Sundararajan . Proceedings of the 25th international conference on Machine learning - ICML '08 . A dual coordinate descent method for large-scale linear SVM . 10.1.1.149.5594 . 7880266 .
  24. Are Loss Functions All the Same? . Neural Computation . 2004-05-01 . 0899-7667 . 1063–1076 . 16 . 5 . 10.1162/089976604773135104 . 15070510 . Lorenzo . Rosasco . Ernesto . De Vito . Andrea . Caponnetto . Michele . Piana . Alessandro . Verri . 10.1.1.109.6786 . 11845688 .
  25. R. Collobert and S. Bengio (2004). Links between Perceptrons, MLPs and SVMs. Proc. Int'l Conf. on Machine Learning (ICML).
  26. 10.1016/S0925-2312(03)00431-4 . The support vector machine under test . Neurocomputing . 55 . 1–2 . 169–186 . September 2003 . Meyer . David . Leisch . Friedrich . Hornik . Kurt .
  27. A Practical Guide to Support Vector Classification . Hsu . Chih-Wei . Chang . Chih-Chung . Lin . Chih-Jen . amp . 2003 . Department of Computer Science and Information Engineering, National Taiwan University . live . https://web.archive.org/web/20130625201224/http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf . 2013-06-25 .
  28. Book: Duan . Kai-Bo . Keerthi . S. Sathiya . Which Is the Best Multiclass SVM Method? An Empirical Study . 10.1007/11494683_28 . Multiple Classifier Systems . . 3541 . 278–285 . 2005 . 978-3-540-26306-7 . 10.1.1.110.6789 . https://www.cs.iastate.edu/~honavar/multiclass-svm2.pdf . 2019-07-18 . 2013-05-03 . https://web.archive.org/web/20130503183745/http://www.cs.iastate.edu/~honavar/multiclass-svm2.pdf . dead .
  29. A Comparison of Methods for Multiclass Support Vector Machines . 2002 . IEEE Transactions on Neural Networks . Hsu . Chih-Wei . Lin . Chih-Jen . 13 . 2 . 415–25 . amp . 18244442 . 10.1109/72.991427 . 2018-01-08 . 2013-05-03 . https://web.archive.org/web/20130503183743/http://www.cs.iastate.edu/~honavar/multiclass-svm.pdf . dead .
  30. Book: Large margin DAGs for multiclass classification . Solla, Sara A.. Sara Solla . Leen, Todd K. . Müller, Klaus-Robert . Klaus-Robert Müller . Advances in Neural Information Processing Systems . MIT Press . 2000 . http://www.wisdom.weizmann.ac.il/~bagon/CVspring07/files/DAGSVM.pdf . 547–553 . Platt . John . Nello Cristianini . Cristianini . Nello . John Shawe-Taylor . Shawe-Taylor . John . live . https://web.archive.org/web/20120616221540/http://www.wisdom.weizmann.ac.il/~bagon/CVspring07/files/DAGSVM.pdf . 2012-06-16 .
  31. Solving Multiclass Learning Problems via Error-Correcting Output Codes . Journal of Artificial Intelligence Research . 1995 . 263–286 . Dietterich . Thomas G. . Bakiri . Ghulum . 1995cs........1101D . cs/9501101 . 2 . live . https://web.archive.org/web/20130509061344/http://www.jair.org/media/105/live-105-1426-jair.pdf . 2013-05-09 . 10.1613/jair.105 . 47109072 .
  32. On the Algorithmic Implementation of Multiclass Kernel-based Vector Machines . 2001 . Journal of Machine Learning Research . 2 . 265–292 . Crammer . Koby . Singer . Yoram . amp . live . https://web.archive.org/web/20150829102651/http://jmlr.csail.mit.edu/papers/volume2/crammer01a/crammer01a.pdf . 2015-08-29 .
  33. Multicategory Support Vector Machines . 2001 . Computing Science and Statistics . 33 . Lee . Yoonkyung . Lin . Yi . Wahba . Grace . amp . live . https://web.archive.org/web/20130617093314/http://www.interfacesymposia.org/I01/I2001Proceedings/YLee/YLee.pdf . 2013-06-17 .
  34. 10.1198/016214504000000098 . Multicategory Support Vector Machines . Journal of the American Statistical Association . 99 . 465 . 67–81 . 2004 . Lee . Yoonkyung . Lin . Yi . Wahba . Grace . 10.1.1.22.1879 . 7066611 .
  35. GenSVM: A Generalized Multiclass Support Vector Machine . 2016. Journal of Machine Learning Research . 17. 224. 1–42. Van den Burg. Gerrit J. J. . Groenen . Patrick J. F.. amp.
  36. Joachims . Thorsten . Transductive Inference for Text Classification using Support Vector Machines . Proceedings of the 1999 International Conference on Machine Learning (ICML 1999) . 200–209.
  37. https://www.cs.cornell.edu/people/tj/publications/tsochantaridis_etal_04a.pdf
  38. Drucker, Harris; Burges, Christ. C.; Kaufman, Linda; Smola, Alexander J.; and Vapnik, Vladimir N. (1997); "Support Vector Regression Machines", in Advances in Neural Information Processing Systems 9, NIPS 1996, 155–161, MIT Press.
  39. Suykens, Johan A. K.; Vandewalle, Joos P. L.; "Least squares support vector machine classifiers", Neural Processing Letters, vol. 9, no. 3, Jun. 1999, pp. 293–300.
  40. Smola . Alex J. . Bernhard . Schölkopf . A tutorial on support vector regression . Statistics and Computing . 14 . 3 . 2004 . 199–222 . live . https://web.archive.org/web/20120131193522/http://eprints.pascal-network.org/archive/00000856/01/fulltext.pdf . 2012-01-31 . 10.1023/B:STCO.0000035301.49549.88 . 10.1.1.41.1452 . 15475 .
  41. Polson . Nicholas G. . Scott . Steven L. . Data Augmentation for Support Vector Machines . Bayesian Analysis . 2011 . 6 . 1 . 1–23 . 10.1214/11-BA601 . free .
  42. Book: Wenzel . Florian . Galy-Fajou . Theo . Deutsch . Matthäus . Kloft . Marius . Machine Learning and Knowledge Discovery in Databases . Bayesian Nonlinear Support Vector Machines for Big Data . 10534 . 307–322 . 2017 . 1707.05532 . 2017arXiv170705532W . 10.1007/978-3-319-71249-9_19 . Lecture Notes in Computer Science . 978-3-319-71248-2 . 4018290 .
  43. Florian Wenzel; Matthäus Deutsch; Théo Galy-Fajou; Marius Kloft; ”Scalable Approximate Inference for the Bayesian Nonlinear Support Vector Machine”
  44. 10.1137/S1052623400374379 . Interior-Point Methods for Massive Support Vector Machines . SIAM Journal on Optimization . 13 . 3 . 783–804 . 2002 . Ferris . Michael C. . Munson . Todd S. . live . https://web.archive.org/web/20081204224416/http://www.cs.wisc.edu/~ferris/papers/siopt-svm.pdf . 2008-12-04 . 10.1.1.216.6893 . 13563302 .
  45. John C. . Platt . Sequential Minimal Optimization: A Fast Algorithm for Training Support Vector Machines . NIPS . 1998 . live . https://web.archive.org/web/20150702075055/http://research.microsoft.com/pubs/69644/tr-98-14.pdf . 2015-07-02 .
  46. Shai . Shalev-Shwartz . Yoram . Singer . Nathan . Srebro . Pegasos: Primal Estimated sub-GrAdient SOlver for SVM . ICML . 2007 . live . https://web.archive.org/web/20131215051700/http://ttic.uchicago.edu/~shai/papers/ShalevSiSr07.pdf . 2013-12-15 .
  47. Rong-En . Fan . Kai-Wei . Chang . Cho-Jui . Hsieh . Xiang-Rui . Wang . Chih-Jen . Lin . LIBLINEAR: A library for large linear classification . . 9 . 1871–1874 . 2008 .
  48. Zeyuan . Allen Zhu . Weizhu . Chen . Gang . Wang . Chenguang . Zhu . Zheng . Chen . P-packSVM: Parallel Primal grAdient desCent Kernel SVM . ICDM . 2009 . live . https://web.archive.org/web/20140407095709/http://people.csail.mit.edu/zeyuan/paper/2009-ICDM-Parallel.pdf . 2014-04-07 .
  49. 9. Aug. 1871–1874. Fan. Rong-En. Chang. Kai-Wei. Hsieh. Cho-Jui. Wang. Xiang-Rui. Lin. Chih-Jen. LIBLINEAR: A library for large linear classification. Journal of Machine Learning Research. 2008.
  50. 10.19026/rjaset.6.3638. 6. 3299–3303. Mohamad. Ismail. Usman. Dauda. Standardization and Its Effects on K-Means Clustering Algorithm. Research Journal of Applied Sciences, Engineering and Technology. 2013-09-01. 17. free.
  51. 10.1140/epjds/s13688-019-0201-0. 8. Fennell. Peter. Zuo. Zhiya. Lerman. Kristina. Kristina Lerman. Predicting and explaining behavioral data with structured feature space decomposition. EPJ Data Science. 2019-12-01. free. 1810.09841.