Decision trees
The basic idea behind decision trees is to use the training dataset to create a tree of decisions to make a prediction.
It recursively splits the training dataset into subsets based on the value of a single feature. Each split corresponds to a node in the decision tree. The splitting process is continued until every subset is pure; that is, all elements belong to a single class. This always works except in cases where there are duplicate training examples that fall into different classes. In this case, the majority class wins.
The end result is a ruleset for making predictions on the test dataset.
Decision trees encode a sequence of binary choices in a process that mimics how a human might classify things, but decide which ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access