I have to create a a svm classifier with RBF kernel and a hard margin. If I undertood correctly, the kind of margin is controlled by the C-parameter. That is, the larger C parameter, the more hard margin I will be getting. Is there a typical C value that emulates a very robust “hard margin”? Or is there any other way to emulate a robust hardmargin? Of course we could always discuss why do we need to emulate a hard margin. But in this case I need to emulate it!
clf = svm.SVC(C = ??,kernel="rbf",gamma =1.5,shrinking=False,cache_size=3000)
Usually you don’t need that large values, but in general that is the idea. Just try setting it to 1e10 and then look at the resulting alphas.
If none of the alphas is at the C value, no regularization was applied (i.e. all points are classified correctly in the trainingset = hard margin).
Btw, if your dataset if very noisy and can not be separated with the kernel you are using, you can not achieve a hard margin.