Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7867971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:51:06+00:00 2026-06-03T00:51:06+00:00

libsvm’s grid.py try to optimize only two parameters c and g of svm-train. I

  • 0

libsvm’s “grid.py” try to optimize only two parameters “c” and “g” of svm-train. I wanted to extend “grid.py” to optimize for other parameters (for example “r” or “d”) by running “grid.py” again and again for different parameters. I have some questions
1. Is there any script already which can optimize parameters other then “c” and “g”?
2. Which parameters are more crucial and what are there maximum/minimum range. Sometime changing/optimizing one parameter automatically optimizes other parameter. Is it the case with svm-train parameters?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T00:51:09+00:00Added an answer on June 3, 2026 at 12:51 am

    As far as I know there is no script that does this, however I don’t see why grid.py couldn’t easily be extended to do so. However, I don’t think its worth the effort.

    First of all, you need to choose your kernel. This is a parameter in itself. Each kernel has a different set of parameters, and will perform differently, so in order to compare kernels you will have to optimize each kernel’s parameters.

    C, the cost parameter is an overall parameter that applies to SVM itself. The other parameters are all inputs to the kernel function. C controls the tradeoff between wide margin and more training points misclassified (but a model which may generalize better to future data) and a narrow margin which fits the training points better but may be overfitted to the training data.

    Generally, the two most widely used kernels are linear (which requires no parameters) and the RBF kernel.

    The RBF kernel takes the gamma parameter. This must be optimized, its value will significantly affect performance.

    If you are using the Polynomial kernel, d is the main parameter, you would optimize that. It doesn’t make sense to modify the other parameters from the default unless you have some mathematical reason why doing so would better fit your data. In my experience the polynomial kernel can give good results, but a minuscule increase if any over the RBF kernel at a huge computational cost.

    Similar with the sigmoid kernel, gamma is your main parameter, optimize that and leave coef0 at the default, unless you have a good understanding of why this would better fit your data.

    So the reason why grid.py does not optimize other parameters is because in most cases its simply unnecessary and generally won’t result in an improvement in performance. As for your second question: No, this is not a case where optimizing one will optimize the other. The optimal values of these parameters are specific to your dataset. Changing the value of the kernel parameters will affect the optimal value of C. This is why a grid search is recommended. Adding these extra parameters to your search is going to significantly increase the time it will take and unlikely to give you an increase in classifier performance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My weight vector is SVM training (using Libsvm ) will have only feature number
I know that LIBSVM only allows one-vs-one classification when it comes to multi-class SVM.
I want to show some letters in Bibliography as capital. For example: @misc{libsvm, abstract
I am considering using libsvm. Currently, I have transformed my feature vectors to SVM
After getting my testlabel and trainlabel, i implemented SVM on libsvm and i got
Do you know of any good c++ svm libraries out there I tried libsvm
I am in dire need of a classification task example using LibSVM in python.
I'd like to write a spam filter program with SVM and I choose libsvm
I'm using LIBSVM for regression analysis. Works like a champ. But a 3-parameter grid
I am using libsvm to predict sentiment. I wanted to know what format the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.