I have gone through a tone of links to understand the concept of Kernel linear and rbf but it's still not clear to me along with gamma and C values (I do know for linear kernel we only use C value). From what I have read if the number of features are greater it's better to use linear and if the features are less rbf should be used. I have total 821 instances in data and 19 features and 1 class label, which kernel should I use? Also please explain to me gamma and C in possible easiest way. Thanks
Asked
Active
Viewed 1,972 times
0
-
1Possible duplicate of [What does the cost (C) parameter mean in SVM?](https://stats.stackexchange.com/questions/225409/what-does-the-cost-c-parameter-mean-in-svm) or [this one](https://stats.stackexchange.com/questions/123346/a-priori-decision-for-a-linear-vs-rbf-kernel-svm) or [many others](https://stats.stackexchange.com/search?tab=votes&q=svm%20hyperparameter). – Sycorax Mar 12 '18 at 01:54
1 Answers
0
You can use GridSearchCV in this case and can specify all the kernels in the parameters and it will give you the best model. check the following link. http://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html GridSearchCv is pretty good in tuning the parameters and since your dataset is not that big so it won't take much time.
"C" I guess is used for regularization to avoid the overfitting. gamma is used for non-linear classification problems. It tells the influence of one training example on the others. Smaller gamma means high influence and vice-versa

Harshit Mehta
- 1,133
- 12
- 15