Quick Breakdown on Decision Tree
What is this about?
This is a supervised learning algorithm and is the most powerful algorithm under the supervised learning category, you can say. This algorithm can be used for both classification and regression.
How does this work?
This is a tree structure classifier where the internal nodes represent the features of a dataset, branches represent the decision rules and each leaf node represents the outcome.
There are two nodes which are the decision node and leaf node. Decision nodes are used to make any decision and have multiple branches, whereas leaf nodes are the output of those decisions and do not contain any further branches.
It's very important to note that the decisions are performed on the basis of features of the given dataset.
This algorithm is called a tree is because it is similar to a tree where it starts with the root node, which then expends on further branches and constructs a tree-like structure.
A decision tree simply asks a question and, based on the answer (Yes/No), it further split the tree into subtrees.
Here is a simple example,
Types of decision trees
- Classification Decision Trees: In this the decision variable is categorical, and the above example is a decision tree for classification related to a person’s fitness and as you can see that it has 2 categories which are Unfit & Fit.
- Regression Decision Trees: In this, the decision trees variable is continuous and not categorical.
This is a quick breakdown of the decision tree algorithm.