Here are the basic steps to install libSVM on Mac OSX.
1 2 3 |
|
Installing libsvm
itself in system path is easy, however hombrew does not include demo-data, python/java integration, or other goodies. The finally installation in homebrew only consists these files:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
In this post, I’ll show you how to modify some Makefiles and create mac specific binaries.
Python, java, or GUI applications (Qt)
First, fetch the source code of libsvm
, and compile it.
1 2 3 4 |
|
SVM-Toy (GUI)
Now, goto svm-toy/qt
directory. Change the CFLAGS and MOC variable in the Makefile
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Then make
. The compile step should run successfully. Try the program ./svm-toy
, press load button and select a demo svm-file (heart_scale for example), then press run, you should see the result!
Python interface
To use the python interface, just export the PYTHONPATH
variable to where python utility fuction located at.
1 2 3 |
|
Then read the README file in the same directory, and try out the example usage of python interface.