분류 트리 관리

R로 배우는 Supervised Learning: 분류

Brett Lantz

Instructor

사전 가지치기

MaxDepth를 이용한 조기 중단

MinSplit을 이용한 조기 중단

R로 배우는 Supervised Learning: 분류

사후 가지치기

복잡한 가지 가지치기

오류 대 복잡도 시각화

R로 배우는 Supervised Learning: 분류

R에서의 사전/사후 가지치기

# pre-pruning with rpart
library(rpart)
prune_control <- rpart.control(maxdepth = 30, minsplit = 20)

m <- rpart(repaid ~ credit_score + request_amt,
           data = loans,
           method = "class",
           control = prune_control)
# post-pruning with rpart
m <- rpart(repaid ~ credit_score + request_amt,
           data = loans,
           method = "class")

plotcp(m)

m_pruned <- prune(m, cp = 0.20)
R로 배우는 Supervised Learning: 분류

연습해 보겠습니다!

R로 배우는 Supervised Learning: 분류

Preparing Video For Download...