वर्गीकरण ट्री की देखभाल

R में Supervised Learning: Classification

Brett Lantz

Instructor

प्री-प्रूनिंग

MaxDepth के साथ Early Stopping

MinSplit के साथ Early Stopping

R में Supervised Learning: Classification

पोस्ट-प्रूनिंग

जटिल ब्रांच को प्रून करना

त्रुटि बनाम जटिलता प्लॉट करना

R में Supervised Learning: Classification

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: Classification

अभ्यास करते हैं!

R में Supervised Learning: Classification

Preparing Video For Download...