hi there!!
i am trying to implement the code of the e1071 package for naive bayes, but it
doens't really work, any ideas??
i am very glad about any help!!
i need a naive bayes with 10-fold cross validation:
code:
library(e1071)
model <- naiveBayes(code ~ ., mydata)
tune.control <- tune.control(random = FALSE, nrepeat = 1, repeat.aggregate =
min,
sampling = c("cross"), sampling.aggregate = mean,
cross = 10, best.model = TRUE, performances = TRUE)
pred <- predict(model, mydata[,-12], type="class")
tune(naiveBayes, code~., mydata, predict.fun=pred, tune.control)
thx for your help!
cheers, julia
--
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.