en205 RSS

software engineer, NLP researcher, economics enthusiast, fitness devotee, culture and politics watcher

Archive

Jun
11th
Wed
permalink

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.

Comments (View)
blog comments powered by Disqus