ipred: possible to use svm in errorest?
Dear all, is it possible to run the support vector machine command "svm" from the package e1071 within the errorest function from the library ipred? It works fine for lda and rda but I get an error message (see below) Thank you for your help. Best wsihes, Daneil # Classification data(iris) # force predict to return class labels only mypredict.lda <- function(object, newdata) predict(object, newdata = newdata)$class
# 10-fold cv of LDA for Iris data errorest(Species ~ ., data=iris, model=svm, estimator = "cv", predict= mypredict.lda)
Error in predict(object, newdata = newdata)$class :
$ operator is invalid for atomic vectors
--