CS 760: Homework 4
Support Vector Machines (SVM) by Sequential Minimal Optimization (SMO)
- Assigned: Monday, October 24, 2011.
- Due: Monday, November 7, 2011.
Implement the SMO algorithm as defined in the lecture notes; you may refer to Platt's paper as well, but do not include additional heuristics or the shortcut for linear SVMs described there.
Your program should take three input parameters.
The first should be a 1 or 2, specifying whether the kernel is polynomial or Gaussian, respectively. (Linear is a special case of polynomial with a polynomial degree of 1.)
The second parameter is the value of C.
The third parameter provides the remaining details of the kernel: for a polynomial kernel, this is the degree of the polynomial (you need only handle values of 1, 2, or 3); for a Gaussian kernel, this is the sigma in the Gaussian function.
Your program should read in the data, then run the
algorithm using the examples in train set.
It should then
print (via System.out.println)
the trained alpha values over the training examples and the algorithm's performance on the test set examples (which examples are correctly predicted and a test set contingency table).