SVM Light is a C program by Thorsten Joachims that implements a support vector machine. This demo, which is compiled from the information at http://svmlight.joachims.org, shows how to use it as a classifier. First you need to install the SVM Light program by following the instructions below.
First we will download a simple example dataset: a text classification problem to learn which articles in a Reuters corpus are about corporate acquisitions.
This will create a directory called example1 that contains the training examples (train.dat) and the test examples (test.dat). To learn a support vector classifier for the training examples and then use it to classify the test examples, do this:
This will produce output that tells you how accurate the classifier was on the test set.
SVM Light provides several kernels, such as linear, polynomial, radial basis function, and sigmoid. Which kernel you use is controlled via the -t parameters. To see all the available parameters, type 'svm_learn -?' (or 'svm_learn -/?' depending on your shell). These are the -t parameters:
Repeat the commands from Part 1 using each of these kernels and report the test set accuracy. Which kernel would you recommend for this dataset?
Try the radial basis function kernel with the gamma parameter varying from 10-6 to 102. Graph the test set accuracy versus gamma. Why does the accuracy depend on gamma this way?.