3
$\begingroup$

Still trying to understand the implementation of the linear vs RBF SVM.

I get the RBF is used when the data is not linearly separable.

My question is:

Given a data set with a multiple class- is there a way to know, a priori, if to use the linear or RBF? (I guess that is another way of asking how do I know, a priori, if the data is linear separable?)

If in practice, if I should run both and see which performs best- what am I looking for to determine which kernel performs best? Just some measure of accuracy?

Thanks

$\endgroup$
1
$\begingroup$

If the number of features n is quite large, use the linear kernel, because it takes much time to compute RBF kernel values for features; the saved time can be used to train with more examples or perform more exhaustive validation to optimize parameters.

And if n is small, using the RBF kernel doesn't matter. If the number of training examples is also small, then you have available computation time to run both and check which performs better by validation.

In addition, if the data features are mostly not numerical, such as the presence of some properties or words with feature values 0 or 1, use the linear kernel, since using RBF kernel makes less sense under such circumstances. On the contrary, if main features of the data are numerical variables, then RBF is a good choice. For example, if a BMI value between 18 to 23 is often indicative of better health, and the task is to train an SVM to predict things related to healthiness or certain diseases, then the values of RBF with good chosen landmarks in the space can properly capture health condition.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.