Efficient Tuning of SVM Hyperparameters Using Radius/Margin Bound and Iterative Algorithms

This page gives a tech report and a code for the automatic tuning of the hyperparameters of a Support Vector Machine (SVM) with L2 soft margin, for which the radius/margin bound is taken as the index to be minimized and iterative techniques are employed for computing radius and margin. The implementation is found to be feasible and efficient even for large problems having more than 10,000 support vectors. The work derives motivation from a recent paper by Chapelle, Vapnik, Bousquet, Mukherjee.

Click here for a gzipped postscript file containing the Tech Report CD-01-02.

Procedure to be followed for using the NPA code:

You need Matlab5.3 running on Windows to run the software. Download the following files:

Warning: The dll works only on Matlab 5.3. I haven't had the time to sit down and get new dll's for future matlab versions. :(

Do the following on your machine.

  1. Create a directory called 'npa' in the C:\MATLABR11\toolbox directory.
  2. Copy npa.m to the C:\MATLABR11\toolbox\npa directory.
  3. Copy npa_fort.dll to the C:\MATLABR11\work directory.
  4. Now open Matlab and set the path for npa by giving the command:

Now you are ready to run the code. To test whether the code is working properly I have included data for an example. The testing can be done by the following steps.

  1. Create the directory C:\banana
  2. Download and copy the following files to the C:\banana directory.
  3. Execute banana.m on Matlab. That will print some info on the matlab window. When testerr is seen it means the solution has been completed.
  4. Now check whether the output files, out.txt and outalpha.txt generated by your computer on the data matches with what is in out1.txt and outalpha1.txt.
  5. Also, on the matlab window you should get: c=0.4043, sigmasq=0.1947, b=0.0702, and testerr=11.449.
  6. Look at banana.m to understand how to run the code on your own data. You can also type "help npa" in matlab window to see a full description of how to use the code.