r caret - LOOCV in R returns error -
in past days began getting familiar r (i come matlab , python). wanted try out caret package (pretty awesome) , keep getting following error message when try train loocv
error in `[.data.frame`(tuneacc, , params, drop = false) : undefined columns selected
now, @ beginning thought "ok, i'm doing wrong here". used code http://machinelearningmastery.com/ :
library(caret) # load iris dataset data(iris) # define training control train_control <- traincontrol(method="loocv") # train model model <- train(species~., data=iris, trcontrol=train_control, method="nb") # summarize results print(model)
which returns same error. full code can found @ following address http://machinelearningmastery.com/how-to-estimate-model-accuracy-in-r-using-the-caret-package/ . did mess installation of r? doing wrong?
it bug in print.train function. see issue 435 on github. should fixed next update of caret (version 6.0-70 or higher).
btw there nothing wrong model. can still use make predictions.
Comments
Post a Comment