View Single Post
Old 02-22-2013, 04:43 PM
htlin's Avatar
htlin htlin is offline
Join Date: Aug 2009
Location: Taipei, Taiwan
Posts: 601
Default Re: Why not use soft margin SVM everytime?

Originally Posted by View Post
In the same vein, could we "always" use soft margin SVMs and use cross validation for getting C? That way, if the data set is in fact linearly separable, the result for C would hopefully be 0, reducing the problem to hard-margin?
Thanks for your time.
Just to clarify, if the data is linearly separable, the corresponding C that would work would be any C greater than or equal to \max_n \alpha_n (of the hard-margin solution), not 0.

In practice it would be difficult to find true hard-margin SVM solvers, and indeed soft-margin works better than hard-margin most of the time (or in some sense soft-margin includes hard-margin as a "special case" when the data is separable). So the procedure that you describe is indeed what most people do for using SVMs.

Hope this helps.
When one teaches, two learn.
Reply With Quote