LFD Book Forum  

Go Back   LFD Book Forum > Course Discussions > Online LFD course > Homework 8

Reply
 
Thread Tools Display Modes
  #1  
Old 11-20-2012, 10:33 PM
orent orent is offline
Junior Member
 
Join Date: Nov 2012
Posts: 2
Default Libsvm and Octave on Windows

It took me a while to figure out how to get libsvm to work with Octave on Windows. C source files had to be compiled to .mex, and those had to be placed where Octave can find them. I documented the process at http://flyingpies.wordpress.com/2012...ve-on-windows/. I hope this helps!
Reply With Quote
  #2  
Old 11-26-2012, 10:57 AM
Matt Heffron Matt Heffron is offline
Junior Member
 
Join Date: Oct 2012
Posts: 7
Default Re: Libsvm and Octave on Windows

This was helpful, but...I got the following warnings when starting Octave with the .mex files in the search path:

warning: function .\libsvmread.mex shadows a core library function
warning: function .\libsvmwrite.mex shadows a core library function
warning: function .\svmpredict.mex shadows a core library function
warning: function .\svmtrain.mex shadows a core library function

I tried hiding them, but then svmtrain was undefined.
(There is a file: "svmtrain_mex.mex" in ...\Octave-3.6.2\lib\octave\packages\nan-2.5.5\i686-pc-mingw32-api-v48+)

Have you seen this?
Reply With Quote
  #3  
Old 11-26-2012, 11:37 AM
orent orent is offline
Junior Member
 
Join Date: Nov 2012
Posts: 2
Default Re: Libsvm and Octave on Windows

I didn't realize it until you pointed it out: Octave ships with the nan package, which includes a version of libsvm. The documentation for the nan package does not list the libsvm entry points directly. Rather, train_sc and test_sc commands provide a richer interface to a wide variety of ML algorithms, including support vector machines. Nevertheless, the libsvm commands are still available via their mex, which may account for the shadowing warnings. They are named svmtrain_mex and svmpredict_mex.

I expect that both the train_sc and svmtrain_mex interfaces should work fine. I didn't try them out though. Had I known about this before, I would probably not have attempted compilation of the libsvm sources into mex.

You should be able to test it out by typing:

>> load pkg nan %note that this lists ~25 shadoing warnings
>> svmtrain_mex
>> svmpredict_mex


See:
nan: http://octave.sourceforge.net/nan/overview.html
train_sc: http://octave.sourceforge.net/nan/fu.../train_sc.html
Reply With Quote
Reply

Tags
libsvm, octave

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:47 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.