When should I use 'rbf' and 'polynomial' kernel trick in machine learning algo?

I have a problem about hate-speech classification using support-vector machine algorithm. The task is to identify the sentence that contains 'positive' or 'negative' sentiment. Which is the best Kernel Trick? ('rbf' or 'polynomial')

Topic kernel supervised-learning scikit-learn svm algorithms

Category Data Science


This looks like it is a duplicate, thought not a complete one, of the following stack

https://stackoverflow.com/questions/27103456/linear-kernel-vs-rbf-kernel

In there is a link to a guide that states, starting on page 12, three scenarios to consider when choosing between a kernel or a linear method:

  1. Number of instances < number of features
  2. Both numbers of instances and features are large
  3. Number of instances > number of features

To summarize, linear is suggested for when the number of features is large or at least larger than the number of instances. Any other instance, a kernel would be suggested.

I also found a link to good primer I deciding between linear and kernel here.

You can condense the advice to the fact that when using SVM decide on the simplest approach first (linear) and if that does not work use RBF as polynomial does not tend to offer any performance improvements above using RBF.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.