문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top