data("iris")
train_id <- sample(seq_len(nrow(iris)), 130)
iris_train <- iris[train_id, ]
iris_test <- iris[-train_id, ]
cl <- CBA(Species ~., iris_train)
pr <- predict(cl, iris_test)
pr
accuracy(pr, response(Species ~., iris_test))
Run the code above in your browser using DataLab