How does SVMTRAIN determine Polynomial and RBF Kernel parameters (gamma,C) in the Bioinformatics Toolbox 3.5 (R2010a)?

1 view (last 30 days)
I am using SVMTRAIN from the Bioinformatic Toolbox 3.5 (R2010a) and I would like to know if SVMTRAIN chooses the Kernel parameters (gamma,C), e.g. for the Polynomial or the RBF Kernel by itself. Is it possible to set these parameters manually?

Answers (1)

Adity
Adity on 18 Jan 2011
MATLAB. SVMTRAIN uses a default value of 1, but you can set this value (e.g. to 0.8) by your own by using:
svmstruct = svmtrain(data, groups, 'Kernel_Function', 'rbf', 'RBF_Sigma', 0.2, 'BoxConstraint', 0.8)
If you want to find the optimal values for (sigma,C) you use cross validation and grid search. The idea is the following: 1. generate disjunct subsets A_i from the main set A, such that the union of the A_i equals A (see CROSSVALIND in Matlab help) 2. in a loop try parameters for (sigma,C) (so called grid search) 3. generate for each subset A_i a support vector machine svm_i with the test parameter pair (sigma,C) 4. test each svm_i with the remaining subsets A_j, j not equal to i 5. take a look on the error rate and take the pair (sigma,C) with the lowest error rate for all pairs (sigma,C) you have tested (see SVMCLASSIFY and CLASSPERF in MATLAB help) 6. calculate the final svm with the so found pair (sigma,C) based on the whole set A You have still some parameters to choose, e.g. the number of subsets A_i and the stepsize for C and sigma. These parameters depends on your given data set and problem, so it is up to you.

Categories

Find more on Oceanography and Hydrology in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!