How to select the C parameter for linear SVMs?
Username
New Altair Community Member
Hi,
I want to use the GridOptimization operator for parameter optimization but in what range should I search the C value for a SVM with linear kernel. Does the C depend on the count of the examples? I sometimes see values between 0 and 30000.
Thanks
I want to use the GridOptimization operator for parameter optimization but in what range should I search the C value for a SVM with linear kernel. Does the C depend on the count of the examples? I sometimes see values between 0 and 30000.
Thanks
Tagged:
0
Answers
-
Hi,
no general answer here but trying, sorry. It totally depends on your data. You could have a look into my Gecco 2007 paper to see how much C sometimes might vary for different data sets. as a rule of thumb, you could try (without parameter optimization first) a low value like and 0.0001 and higher values like 1000, 10000, and even 100000. Check if the runtime is ok for you and have a look at the predictive power. Then start with a rough grid parameter optimization to find a good range and start (at least) a second one to further optimize it.
Cheers,
Ingo0 -
Thanks for your answer. Since I want to use EqualLabelWeigting because of the class skew I need to use the JMySVM operator instead of LibSVM. Are there any differences concerning the performance of the learner and the application of the model?0
-
Hi,
no, there are no differences in principle. The LibSVM, however, is already able to work on more than 2 classes in a classification setting. For the JMySVM, you have to wrap a Polynominal2Binominal meta learner around the SVM. Another thing: the kernel parameter sigma (JMySVM) corresponds to the parameter gamma (LibSVM). Please note that sigma is 1 / gamma.
Cheers,
Ingo0