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$
1

1 Answer 1

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$
3
  • 1
    $\begingroup$ I use R for svm classification, but i can not install Optiunity package. Thankyou Mr. Claesen $\endgroup$ Jul 13, 2015 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$ Jul 13, 2015 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$ Jul 13, 2015 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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