Skip to content
/ svm Public

L1-SVM & L2-SVM optimised using Log barrier Interior point and Sequential Minimal Optimisation (SMO) algorithms.

License

Notifications You must be signed in to change notification settings

udeepam/svm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SVM: from scratch

This repository contains python code for training and testing a multiclass soft-margin kernelised SVM implemented using NumPy.

Overview

The loss functions used are

  • L1-SVM: standard hinge loss ,
  • L2-SVM: squared hinge loss.

The constrained optimisation problems are solved using

Generalisation to the multiclass setting can be achieved using

  • One vs One (OVO)
  • One vs Rest (OVR)

An example Jupyter notebook is provided for training and testing a support vector classifier (SVC) on a reduced version of the MNIST dataset.

Code

A list of optimisation algorithms that have been coded up in this repository include

  • Log barrier Interior point
  • Feasible Newton
  • SMO
  • Backtracking linesearch obeying Armijo conditions
  • Linesearch obeying strong Wolfe conditions
  • Descent algorithm using steepest descent direction and Newton direction

Kernel functions available

  • Gaussian radial basis function (RBF) kernel
  • Polynomial kernel

Resources

Useful resources

About

L1-SVM & L2-SVM optimised using Log barrier Interior point and Sequential Minimal Optimisation (SMO) algorithms.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published