LFD Book Forum  

Go Back   LFD Book Forum > Course Discussions > Online LFD course > The Final

Reply
 
Thread Tools Display Modes
  #1  
Old 06-09-2013, 11:45 AM
bargava bargava is offline
Junior Member
 
Join Date: Apr 2013
Posts: 8
Default Q13 - on using LIBSVM : C parameter?

I am trying to use LIBSVM to do this. And for using this, a value for C should be specified.

Should C be assigned an extremely large arbitrary value (say: 1e+10)? Would that be similar to implementing a hard margin SVM?
Reply With Quote
  #2  
Old 06-09-2013, 11:58 AM
sptripathi sptripathi is offline
Junior Member
 
Join Date: Apr 2013
Posts: 8
Default Re: Q14 - on using LIBSVM : C parameter?

Quote:
Originally Posted by bargava View Post
I am trying to use LIBSVM to do this. And for using this, a value for C should be specified.

Should C be assigned an extremely large arbitrary value (say: 1e+10)? Would that be similar to implementing a hard margin SVM?
I used a high value for C, otherwise it regularizes. Observed that in libsvm case it regularized so much that E_in was never zero. So I suppressed regularization by choosing a high value of C.

From Prof's lecture, I recall that the high value of C ensures that slackness is penalized heavily, so as to achieve hard margin.
Reply With Quote
  #3  
Old 06-09-2013, 02:31 PM
marek marek is offline
Member
 
Join Date: Apr 2013
Posts: 31
Default Re: Q14 - on using LIBSVM : C parameter?

Quote:
Originally Posted by bargava View Post
I am trying to use LIBSVM to do this. And for using this, a value for C should be specified.

Should C be assigned an extremely large arbitrary value (say: 1e+10)? Would that be similar to implementing a hard margin SVM?
I tried 10^3 first and then increased the exponent until the output stopped changing.

Edit: I seem to recall that 1000 was considered a good rule of thumb for a hard margin. But I found from practice that in this question it was still insufficient.
Reply With Quote
  #4  
Old 06-10-2013, 02:43 PM
Dorian Dorian is offline
Member
 
Join Date: Apr 2013
Posts: 11
Default Re: Q14 - on using LIBSVM : C parameter?

Good catch, thanks! I had the same problem.

One might assume (wrongly as it turns out) that it does hard margin svm by default but of course it does soft margin by default as that is probably more useful in practice.

Also I guess, if you choose enough of a large C as you suggest, SVM should have no trouble to deal with such noiseless data, similar to the example we had in class.
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:46 AM.


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