Wednesday, May 7, 2014

Multi-kernel learning, run "SMO-MKL" on my laptop (windows 8 64 bit)

I am compiling an open-source code set of multi-kernel learning:
http://research.microsoft.com/en-us/um/people/manik/code/smo-mkl/download.html
This is not the latest ML software, but could be a good start.

Now it is working on my windows 8 (64 bit)
1. Add $Programfiles$\Microsoft Visual Studio 11.0\VC\bin to $path$
  run "vcvars32.bat" to set up all path and environment variables for Visual C++.
http://msdn.microsoft.com/en-us/library/f2ccy3wt.aspx

2. type:
nmake -f Makefile.win clean all

Done~ the compiled exe files are located in Windows sub-directory.
Have a try:
svm-train -s 0 -h 0 -m 400 -o 2.0 -a 26 -c 10.0 -l 1.0 -f 0 -j 1 -g 3 -k Example/Classification/PrecomputedKernels/kernelfile Example/Classification/PrecomputedKernels/y_train Example/Classification/PrecomputedKernels/model_file
This example is to train a model from a kernel matrix. And you may test on testing data:
svm-predict Example/Classification/PrecomputedKernels/y_test Example/Classification/PrecomputedKernels/model_file Example/Classification/PrecomputedKernels/prediction

I eventually found that nmake -f Makefile.win clean all actually did not compile the svm.cpp again, but instead, it is based on pre-compiled svm.obj. And if you made a change on svm.cpp, then nmake will give you some error message. I did not have a solution for it so far.

3. error/warning message when run "svm-predict".
This is annoying, because I wanna do grid search to find the optimal values for parameters. And actually the result is correct, but only because of exception not been handled, the error message comes out. This makes the pipeline stopped and have to manually click a confirm button to continue.
I have to change the svm-predict.c, to comment off the code to destroy svm_model.



No comments:

Post a Comment