Supervised Learning in R: Classification
Brett Lantz
Instructor
# building a simple rpart classification tree
library(rpart)
m <- rpart(outcome ~ loan_amount + credit_score, data = loans,
method = "class")
# making predictions from an rpart tree
p <- predict(m, test_data, type = "class")
Supervised Learning in R: Classification