2
$\begingroup$

I want to find the best choice of $C$ and $\gamma$ parameters for Radial Basis Function kernel.

I am using kernlab instead of e1071 library. So how can i optimize RBF parameters $C$ and $\gamma$ with ksvm function?

$\endgroup$
2
$\begingroup$

You can use Optunity for that purpose. This is a library of optimization algorithms for automated hyperparameter search.

You can find an example of using Optunity to optimize an SVM in e1707 here, mapping this to kernlab should be straightforward. All you need to do is specify box constraints (a lower and upper bound) on $C$ and $\gamma$ and a budget of function evaluation (i.e., how many ($C$, $\gamma$)-pairs can be tested.

$\endgroup$
  • 1
    $\begingroup$ I use R for svm classification, but i can not install Optiunity package. Thankyou Mr. Claesen $\endgroup$ – SKMohammadi Jul 13 '15 at 5:04
  • 1
    $\begingroup$ Excuse me Mr. Claesn, I didn't know that you are main contributor of Optunity package. At last, the command install_github("claesenm/optunity/wrappers/R") worked for me! $\endgroup$ – SKMohammadi Jul 13 '15 at 6:22
  • $\begingroup$ Glad to hear it's working! If you run into any problems, please let us know via Github issues so we can solve them ASAP. $\endgroup$ – Marc Claesen Jul 13 '15 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.