Question

I am using e1071 (svm) package of R. If I give cross parameter to the builder method, it cross validates and chooses the best model. However, if I do the cross validation manually, I would have accuracy rates of all models which are built for each fold. Is there a way to get accuracy rate of the chosen model by e1071 package?

Était-ce utile?

La solution

I think you may want to look at accuracies as in

> require(e1071)
> model <- svm(Species ~ ., data = iris, cross=5)
> model$accuracies
[1] 100.00000  96.66667  93.33333  96.66667  93.33333

I assume these are percentages for the accuracy of each fold. You could if you wanted then take the mean.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top