用树做决策

R 中的监督学习:分类

Brett Lantz

Instructor

决策树模型

示例树结构

R 中的监督学习:分类

用于预测的决策树

Lending Club 在线申请

R 中的监督学习:分类

分而治之

分而治之示例

R 中的监督学习:分类

分而治之

分而治之示例

R 中的监督学习:分类

分而治之

分而治之示例

R 中的监督学习:分类

生成的树

分而治之示例

分而治之示例

R 中的监督学习:分类

在 R 中构建树

# 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")
R 中的监督学习:分类

开始练习吧!

R 中的监督学习:分类

Preparing Video For Download...