Arasu
Arasu

Reputation: 1

R. How to boost the SVM model

I have made SVM model using SVM package in R for a classification problem. I got only 87% accuracy. But random forest produces around 92.4%.

fit.svm<-svm(modelformula, data=training, gamma = 0.01, cost = 1,cross=5)

Would like to use boosting for tuning this SVM model. Can someone will help me to tune this SVM model?

  1. What are the best parameters I can provide for SVM method?
  2. Example for booting for SVM model.

Upvotes: 0

Views: 1241

Answers (2)

Amrita Sawant
Amrita Sawant

Reputation: 10913

To answer your first question.

  • The e1071 library in R has a built-in tune() function to perform CV. This will help you select the optimal parameters cost, gamma, kernel. You can also manipulate a SVM in R with the package kernlab. You may get different results from the 2 libraries. Let me know if you need any examples.

Upvotes: 2

LauriK
LauriK

Reputation: 1929

You may want to look into the caret package. It allows you to both pick various kernels for SVM (model list) and also run parameter sweeps to find the best model.

Upvotes: 0

Related Questions