1

I want to use SVM using 10-fold cross-validation (CV). My code is as follows:

svm.model <- svm(train.d, y=train.l,
                 type='C-classification',
                 cross=kfold,
                 kernel=kernel)

I know that in k-fold CV, k different models are trained. Which of those k models is the final svm.model? Is it the trained model with maximum accuracy?

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650
WhoAmI
  • 13
  • 3

1 Answers1

2

Which library do you use? Cross-validation is not a model selection method by itself, it's rather a way to estimate mean square error (for regression) or accuracy rate (for classification). It is likely that the model you get is the SVM fitted for the data specified in the parameters, no specific selection should be done on behalf of CV.

Cross-validation allows you to fit the model to all available data and still be informed about it's performance.