Giter Club home page Giter Club logo

frank-wolfe-svm's Introduction

Frank-Wolfe Methods for SVM Training

Papers

  • Revisiting Frank-Wolfe: Projection-Free Sparse Convex Optimization (Jaggi, 2013)
  • On the Global Linear Convergence of Frank-Wolfe Optimization Variants (Lacoste-Julien, Jaggi, 2015)
  • An Equivalence between the Lasso and Support Vector Machines (Jaggi, 2014)

Tasks

In this notebook we will implement:

  • Frank-Wolfe Algorithm
  • Away-Step Frank-Wolfe
  • Pairwise Frank-Wolfe
  • Fully Corrective Frank Wolfe

to train soft-margin SVM on the following datasets:

At the end we will compare the perfomace of the algorithms with each other.

Description of the Problem

To train soft marging SVM we will formulate the optimization as follows:

$$ min_{w, \xi} \frac{1}{2} w^{T}w + \frac{C}{2} \sum_{i=1}^{N}\xi_{i}^2 $$

$$ s.t. $$

$$ y_{i}(wx_{i} + b)\geq 1 - \xi{i} $$

$$ \xi{i} \geq 0 $$

This is known as the Primal problem.

We can transform the primal problem into a dual one by constructing the lagrangian and applying the KKT conditions. After doing so we find:

Lagrangian of the Dual Problem

$$ L_{D} = -\frac{1}{2C}\sum_{i=1}^{N}\alpha_{i}^2 - \frac{1}{2}\sum_{i=1}^{N}\sum_{j=1}^{N}\alpha_{i}\alpha_{j}y_{i}y_{j}x_{i}^{T}x_{j} $$

$$ s.t. $$ $$ \alpha_{i} >= 0 \sum_{i=1}^{N}\alpha_{i} = 1 $$

Which is equivalent to:

$$ min_{\alpha} L_{D} = \frac{1}{2}\sum_{i=1}^{N}\sum_{j=1}^{N}\alpha_{i}\alpha_{j}y_{i}y_{j}x_{i}^{T}x_{j} + \frac{1}{2C}\sum_{i=1}^{N}\alpha_{i}^2 $$

$$ s.t. $$ $$ \alpha_{i} >= 0 $$

$$ \sum_{i=1}^{N}\alpha_{i} = 1 $$

We will use Frank-Wolfe and variations of Frank-Wolfe to solve this minimization problem.

Collaborators

frank-wolfe-svm's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.