7
$\begingroup$

I am searching tutorial for support vector regression in R. I found this and manual for e1071 package. But there is few explanation how to set parameters, like choose kernels, choose regression, not classification. Any material is appreciated.

$\endgroup$

2 Answers 2

3
$\begingroup$

For selecting parameters (such as the C parameter) I have no great advice. I have found I just need to try different values and using bootstrap or cross-validation to select the best ones.

One useful nugget I picked up along the way though is the concept of calibrating the predictions from the SVM output for regression. If for example you are trying to find the probability of a binary outcome occurring (Bernoulli trial) using SVM, then the quantity returned from the algorithm will not be the probability, but will be monotonically related to it. In order to calibrate the response, you can use e.g. logistic regression

$p = \frac{1}{1+e^{(-g(f))}}$

where $g(f)$ is some function of the SVM predictions $f$. I've found that a simple linear function $g(f) = a + bf$ usually does the job.

$\endgroup$
1
$\begingroup$

Try using the kernlab package, you can use ksvm(...,type='eps-svr') to get regression. It's smart enough to automatically select regression if given a continuous variable.

A grid search for parameters usually works reasonably well. Choice of kernel can have a big impact on performance. One rules of thumb I've found is that linear kernels or lower order polynomials work ok with high dimension problems, but RBFs work better with low dimension problems. But you're still best trying everything.

$\endgroup$

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.