Solved – Grid search and tolerance in libsvm

cross-validationlibsvmmachine learningsvm

  1. I'm using libsvm and the 3-fold cross validation to select the best C and gamma, but I'm not sure for the range to use in the grid search. Is there any standard way to choose this range? I used: log2c =(-10:3:4) and log2g=exp(-10:3:4)

  2. If I change the tolerance -e, the result change, can any one clarify tis point for me?

thank you.

Best Answer

I don't think there is a standard way to choose a range (there are some heuristics for choosing a gamma value). I would look at the libsvm practical tutorial on getting started with SVMs. http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf

Generally, I don't think you usually see C values that are so low. I would start with 2^-3 to 2^10 for C values and keep the gamma range the same. I would then run a coarse to fine grid search. It looks like you're using steps of 4? I would then search the area around the most accurate parameter set at a smaller step size, like 1.

Hope this helps.