Data Analytics & R Programming: Decision Tree Algorithm
Data Analytics & R Programming: Decision Tree Algorithm
Data Analytics & R Programming: Decision Tree Algorithm
ROOT Node: It represents entire population or sample and this further gets divided
into two or more homogeneous sets.
SPLITTING: It is a process of dividing a node into two or more sub-nodes.
Decision Node: When a sub-node splits into further sub-nodes, then it is called
decision node.
Leaf/ Terminal Node: Nodes do not split is called Leaf or Terminal node.
Pruning: When we remove sub-nodes of a decision node, this process is called
pruning. You can say opposite process of splitting.
Weekend Plan – Decision Tree
ROOT NODE
NO Rain YES
Go
Go Out
Out Stay
Stay in
in
INTERIOR NODES
Shopping Movie Coffee Shop TV Shows
Shopping Movie Coffee Shop TV Shows
NO YES NO YES
LEAF NODES
CART ALGORITHM
• Classification and Regression Trees or CART for short is a term
introduced by Leo Breiman to refer to Decision Tree algorithms
that can be used for classification or regression predictive
modeling problems.
data = read.csv("D:/S Prabhakar 14.6.18/1 Even Semester 2020 Jan/R Programming/Class/Decision Tree/data1.csv")
rpart.plot(tree)
rpart.plot(tree)
Decision Tree – R Programming