Support Vector Machine (SVM) using Log Barrier Method
Introduction: Support Vector Machine
SVM is a popular classification algorithm utilized in applications of artificial intelligence to separate dissimilar data. Given a two class training dataset, SVM generates an optimal separating hyperplane (by maximizing the margin) to separate two class of data using a constrained quadratic convex optimization formulation.
Preliminaries
In this project, we formulate SVM classifier as an optimization problem. We will cover some preliminaries on optimization before describing details of SVM.Convex Optimization
Convex optimization deals with the problem of minimizing (or maximizing) a convex function over a convex set.
Here \(f(x)\) and \(D\) are convex.
The optimization problem for SVM results in a convex program which can be solved efficiently. Moreover, we will consider special class of cost functions for SVM to obtain a convex quadratic program.
Quadratic Optimization
Quadratic Optimization, or Quadratic Programming (QP), is a type of optimization problem where the objective function is quadratic, and the constraints are linear.
Here \(P\succeq 0\) for a convex quadratic program.
Indicator Function
Indicator functions are used to make inequality constraint implicit in the objective function.
Indicator function are used to convert a constrained optimization problem to an unconstrained optimization problem. The latter is easier to solve.
Approximate Indicator Function (Log Barrier Function)
For numerical computations, we need to approximate the indicator function. One approach is using the log barrier function
Optimization: SVM
Given a set of linearly separable data points and labels \((x_i, y_i)\), finding the maximum margin separating hyperplane is equivalent to the following constrained optimization problem
Here \(\langle w,x\rangle+b=0\) is the equation of hyperplane (decision boundary).
Optimization: SVM using Log Barrier Function
To make the constraint in the earlier optimization problem implicit in the objective function, we can make use of the log barrier function defined in the preliminaries.
Here \(t\in \mathbb{R}_+\)
Optimization Problem to Find Feasible Start Point
Presence of logarithm in objective function of SVM using log barrier function restricts start of optimization from any random initial point. Therefore, we need an additional mechanism to find a feasible starting point
We can put a lower bound on \(s\) to prevent unnecessary computation.
Central Path Method
In the SVM using log barrier method, if we use very large value of t to run our optimization, we get poor results due to large value of Hessian of objective function at the boundary of solution space. Hence, optimization is run multiple times with increasing value of t . Solution from previous iteration is used as starting point for current iteration. This technique is known as central path method.
Central Path
Let \(x^*(t),\ t>0\) be the solution of
Then the central path associated with it is defined as the set of points \(x^*(t),\ t>0\) which we call the set central points.
Soft Margin SVM
When a dataset is not linearly separable due to insufficient features, noise and spurious data, we can not find a linearly separable hyperplane. In such cases, we have to use a soft margin SVM classifier.Optimization: Soft Margin SVM
Here \(C\) is a regularization/penalty parameter.
Optimization: Soft Margin SVM using Log Barrier Method
Here \(C\) is a reqularization/penalty parameter.
Optimization problem for finding the feasible starting point remains the same. Only the minimum value of \(s\) turns out to be negative for linearly inseparable dataset. This can be handled by appropriately chosing the initial values of \(\xi_i\forall i\).
Documentation
For more details about the project, one can go through the presentation.
Author
Anurag Gupta is an M.S. graduate in Electrical and Computer Engineering from Cornell University. He also holds an M.Tech degree in Systems and Control Engineering and a B.Tech degree in Electrical Engineering from the Indian Institute of Technology, Bombay.
Comment
This policy contains information about your privacy. By posting, you are declaring that you understand this policy:
- Your name, rating, website address, town, country, state and comment will be publicly displayed if entered.
- Aside from the data entered into these form fields, other stored data about your comment will include:
- Your IP address (not displayed)
- The time/date of your submission (displayed)
- Your email address will not be shared. It is collected for only two reasons:
- Administrative purposes, should a need to contact you arise.
- To inform you of new comments, should you subscribe to receive notifications.
- A cookie may be set on your computer. This is used to remember your inputs. It will expire by itself.
This policy is subject to change at any time and without notice.
These terms and conditions contain rules about posting comments. By submitting a comment, you are declaring that you agree with these rules:
- Although the administrator will attempt to moderate comments, it is impossible for every comment to have been moderated at any given time.
- You acknowledge that all comments express the views and opinions of the original author and not those of the administrator.
- You agree not to post any material which is knowingly false, obscene, hateful, threatening, harassing or invasive of a person's privacy.
- The administrator has the right to edit, move or remove any comment for any reason and without notice.
Failure to comply with these rules may result in being banned from submitting further comments.
These terms and conditions are subject to change at any time and without notice.
Similar content
Past Comments