🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How to select the C parameter for linear SVMs?

User: "Username"
New Altair Community Member
Updated by Jocelyn
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

Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "IngoRM"
    New Altair Community Member
    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,
    Ingo
    User: "Username"
    New Altair Community Member
    OP
    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?
    User: "IngoRM"
    New Altair Community Member
    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,
    Ingo