Search code examples
opencvclassificationsvmemgucvlibsvm

SVM parameter tuning


I am newbie to using svm for classification. I want to tune svm parameters by .TrainAutofunction in EmguCV. But I don't know what are the range(min-max value) of below parameters that I should give to this function to search:

1- C (for poly and RBF kernels)

2- Gamma (for poly and RBF kernels)

3- Coeficient (for poly kernel)

4- Degree (for poly kernel)

What are the range of these parameters?

Do these ranges depends on the number of samples?

As I receive the out of memory allocation error, can I set step parameter to a large value and when I found optimal values approximately, set these range to a smaller one and search on the second range with smaller step?


Solution

  • In general, you should consider the RBF kernel first, unless you have a good reason not to. Here are some guides on how to choose the parameters C and gamma:

    http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf

    http://scikit-learn.org/stable/auto_examples/svm/plot_rbf_parameters.html