How to tune C parameter in SVM in R?

svm
r

#1

Howdy!

I was using svm in a classification problem.
The changes in the cost parameter change the decision boundary. Can you please help me out in getting the optimum cost parameter for the best classification?

The code is as follows:
library (e1071) model<-svm(y∼., data=train , kernel ="linear", cost=10, scale=FALSE) plot(model,train)

Here the training set is ‘train’ and the dependent variable is ‘y’

Regards,
CC


#2

Hey @Corporate_Cowboy,
You can take a look at this article, I am sure you will get some insights about parameter tuning in SVM.

http://www.analyticsvidhya.com/blog/2015/10/understaing-support-vector-machine-example-code/

Hope this helps!
Regards,
SD