Solved – Which search range for determining SVM optimal C and gamma parameters

classificationkernel tricksvm

I am using SVM for classification and I am trying to determine the optimal parameters for linear and RBF kernels. For the linear kernel I use cross-validated parameter selection to determine C and for the RBF kernel I use grid search to determine C and gamma.

I have 20 (numeric) features and 70 training examples that should be classified into 7 classes.

Which search range should I use for determining the optimal values for the C and gamma parameters?

Best Answer

Check out A practical guide to SVM Classification for some pointers, particularly page 5.

We recommend a "grid-search" on $C$ and $\gamma$ using cross-validation. Various pairs of $(C,\gamma)$ values are tried and the one with the best cross-validation accuracy is picked. We found that trying exponentially growing sequences of $C$ and $\gamma$ is a practical method to identify good parameters (for example, $C = 2^{-5},2^{-3},\ldots,2^{15};\gamma = 2^{-15},2^{-13},\ldots,2^{3}$).

Remember to normalize your data first and if you can, gather more data because from the looks of it, your problem might be heavily underdetermined.