LFD Book Forum  

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

Reply
 
Thread Tools Display Modes
  #1  
Old 02-27-2013, 03:14 AM
IlanTal IlanTal is offline
Member
 
Join Date: Jan 2013
Location: Haifa, Israel
Posts: 30
Default can't get LIBSVM on Ubuntu, how to scale SV?

I tried to install the LIBSVM on my Linux box for Octave and failed. I fixed the path names but it fails to find mex.h, which I can't find either.
Yesterday I tried to run on the full training set and after 3/4 hour Octave crashed running out of memory. Today I tried running on the first 400 points and that takes 4 minutes. 500 points takes 8.5 minutes
Question 1: how long does a run take on the full training set using LIBSVM?
Question 2: how to scale the number of support vectors?
I compared 400 to 500 points and got 1.33 more vectors with 1.25 more points. If I have to guess I will guess 7291/400 -> 18 times more SV

It is a pity I can't get the LIBSVM to run but since the main point of the homework is to learn, at least I will use what I can (400 points) to do the exercises.
Thanks,
Ilan
Reply With Quote
  #2  
Old 02-27-2013, 06:24 AM
SeanV SeanV is offline
Junior Member
 
Join Date: Jan 2013
Posts: 8
Default Re: can't get LIBSVM on Ubuntu, how to scale SV?

how much memory do you have? unless you say that people can't tell whether it is a problem with your implementation or a true memory problem???

there are also iterative methods i believe

and I've heard good things about Shogun


But I haven't done the homework yet!
Reply With Quote
  #3  
Old 02-27-2013, 10:04 AM
IlanTal IlanTal is offline
Member
 
Join Date: Jan 2013
Location: Haifa, Israel
Posts: 30
Default Re: can't get LIBSVM on Ubuntu, how to scale SV?

Thanks for the reply. I have 3GB of memory, still under the 4GB limit where a 64 bit OS is required, but more than enough for most purposes.
After 3/4 hour of grinding away with no answer it is most reasonable that memory would be used up. I looked at the memory allocation and even the swap memory, which up until now has always been zero had half of it in use.
I'm convinced the error message was correct. Normal memory managed to clear most of itself after octave came out of its crash. Still to get things back to normal I had to do a reset - a log out wasn't enough.
Reply With Quote
  #4  
Old 02-27-2013, 02:44 PM
Sendai Sendai is offline
Member
 
Join Date: Jan 2013
Location: Minnesota
Posts: 29
Default Re: can't get LIBSVM on Ubuntu, how to scale SV?

I can't help with Octave, but Ubuntu has a libsvm-tools package that contains command-line tools for working with libsvm. You might be able to do most/all of the homework using that.

I'm using libsvm with Python, and my code uses less than 40Mb of memory to solve question #2.

(BTW, 32-bit Ubuntu doesn't have a 4Gb memory limit...my system is able to see all 8Gb of memory I have.)
Reply With Quote
  #5  
Old 02-28-2013, 10:36 AM
ivankeller ivankeller is offline
Junior Member
 
Join Date: Jan 2013
Posts: 9
Default Re: can't get LIBSVM on Ubuntu, how to scale SV?

I recommend the nice Python module scikit-learn which implement SVM with libsvm. Pretty easy to use.
Reply With Quote
  #6  
Old 02-28-2013, 12:07 PM
IlanTal IlanTal is offline
Member
 
Join Date: Jan 2013
Location: Haifa, Israel
Posts: 30
Default Re: can't get LIBSVM on Ubuntu, how to scale SV?

I tried to install shogun which had the advantage of being in the Ubuntu repository. Catch-22, the octave-shogun interface has been dropped due to the fact that it was limited to 4GB. So it looks like I'll do the homework based upon 400 points. My extrapolation may be inaccurate but I'll use a factor of 18 times the number of vectors I get and hope it is reasonably close.
Reply With Quote
  #7  
Old 02-28-2013, 01:38 PM
SeanV SeanV is offline
Junior Member
 
Join Date: Jan 2013
Posts: 8
Default Re: can't get LIBSVM on Ubuntu, how to scale SV?

I would also recommend scikit-learn... [because it is very easy and has plenty of documentation]

svm scikit learn

you should be able to adust examples


I have installed it on a 3gb windows 7 32-bit machine no problem [ and its in ubuntu repository]

To echo sendai ... I didn't see any memory spikes at all when I ran it on on my 3gb machine questions 2,3 took about a couple of minutes.... so I suspect you are doing something seriously wrong
Reply With Quote
Reply

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 03:35 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2021, 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.