model <- OneR(iris)
prediction <- predict(model, iris[1:4])
eval_model(prediction, iris[5])
## type prob
predict(model, data.frame(Petal.Width = seq(0, 3, 0.5)))
predict(model, data.frame(Petal.Width = seq(0, 3, 0.5)), type = "prob")
Run the code above in your browser using DataLab