Skip to content
Prev 263262 / 398502 Next

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
Error in predict(object, newdata = newdata)$class :
    $ operator is invalid for atomic vectors

 

--