📝 字数:working on
Decision Tree¶
Estimated time to read: 1 minute
A DT makes predictions by breaking down a problem into a series of yes/no questions, orgranized like a flowchart. It's called a "tree" because it starts at a root and branches out into nodes (decisions) and leaves (final predictions),
Terminologies¶
leaf node¶
A node that doesn't have any child nodes.
splitting¶
The process of dividing a node into two or more sub nodes
pruning¶
The opposite of splitting, that removes subnodes of a decision node.
Decision Tree vs If-Else¶
It is a series of if-else statements. The key is building these rules automatically, it is not really about the tree once built, it is about how we created it. DT is not exactly in a brute-force, try-everything way. It uses a greedy algorithm to pick the best split at each step.