Jun
11th
Wed
11th
SVMlight with Python
I recently needed a Support Vector Machine (SVM) classifier for a document classification experiment written in Python. I chose to use Thorsten Joachims’ SVMlight. I couldn’t find a Python interface, so I wrote a simple shell-based one.
class SVMLight:
"""
An interface class for U{SVM light<http://svmlight.joachims.org/>}
This class currently supports classification with default options
only. It calls the SVMLight binaries as external programs.
Future versions should add a SWIG interface and support for use of
non-default SVMlight options.
C{SVMLight} reads sparse feature vectors - dictionaries with
numeric keys, representing features, and arbitrary numeric values.
"""
svmlight.py is free for any use.