Skip to main content

Naive SVM library in Python

Project description

By Andrew Tulloch (http://tullo.ch)

Introduction

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

See http://tullo.ch/articles/svm-py/ for a description of the algorithm used and the general theory behind SVMs.

Demonstration

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
                   FILENAME]

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

http://i.imgur.com/yy0oUVk.png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

svmpy-0.3.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

svmpy-0.3.macosx-10.8-x86_64.exe (66.9 kB view details)

Uploaded Source

File details

Details for the file svmpy-0.3.tar.gz.

File metadata

  • Download URL: svmpy-0.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for svmpy-0.3.tar.gz
Algorithm Hash digest
SHA256 1dca219d7eec0b8fb2d59a16dd754208a7d689b293054d3762dc888802853cde
MD5 14bf8dc2a94151d320ae94178dbdd14c
BLAKE2b-256 391ee3828cc9a38db7cd660e776d1a1ead66bb67c5bfddd589926e8ee11d3cdf

See more details on using hashes here.

File details

Details for the file svmpy-0.3.macosx-10.8-x86_64.exe.

File metadata

File hashes

Hashes for svmpy-0.3.macosx-10.8-x86_64.exe
Algorithm Hash digest
SHA256 7842b445b449f2108462311afa054690ee056f2e9c050acd815281fa6ce7bc33
MD5 1f2f463d541c6751750975f7d890a583
BLAKE2b-256 2f743d2a8fb7c14193beed97ae54fe8c4b02fe100cf434383fb0aa1b1b04f6b7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page