Basic soft-margin kernel SVM implementation in Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
bin Added demonstration to VC Nov 26, 2013
svmpy Add radial basis function kernel Mar 30, 2016 Updated MANIFEST Nov 26, 2013
README.rst Add a Bitdeli badge to README Dec 17, 2013 Update README Nov 26, 2013



By Andrew Tulloch (


This is a basic implementation of a soft-margin kernel SVM solver in Python using numpy and cvxopt.

See for a description of the algorithm used and the general theory behind SVMs.


Run bin/svm-py-demo --help.

∴ bin/svm-py-demo --help
usage: svm-py-demo [-h] [--num-samples NUM_SAMPLES]
                   [--num-features NUM_FEATURES] [-g GRID_SIZE] [-f

optional arguments:
  -h, --help            show this help message and exit
  --num-samples NUM_SAMPLES
  --num-features NUM_FEATURES
  -g GRID_SIZE, --grid-size GRID_SIZE
  -f FILENAME, --filename FILENAME

For example,

bin/svm-py-demo --num-samples=100 --num-features=2 --grid-size=500 --filename=svm500.pdf

yields the image

Bitdeli badge