data("iris")
# learn a classifier using automatic default discretization
classifier <- FOIL(Species ~ ., data = iris)
classifier
# inspect the rule base
inspect(classifier$rules)
# make predictions for the first few instances of iris
predict(classifier, head(iris))
Run the code above in your browser using DataLab