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?
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It only takes a minute to sign up.
Sign up to join this communityI 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?
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.
install_github("claesenm/optunity/wrappers/R")
worked for me!
$\endgroup$
Jul 13, 2015 at 6:22