Random Forest Classifier
If you think about the name random forest classifier, it can be explained as follows:
- A forest consists of multiple trees.
- These trees can be used for classification.
- Since the only tree we have used so far for classification is a decision tree, it makes sense that the random forest is a forest of decision trees.
- The random nature of the trees means that our decision trees are constructed in a randomized manner.
Therefore, we will base our decision tree construction on information gain or Gini Impurity.
Once you understand these basic concepts, you essentially know what a random forest classifier is all about. The more trees you have in the forest, the more accurate prediction is going to be. When performing prediction, each tree performs classification. We collect the results, and the class that gets the most votes wins.
Random forests can be used for regression as well as for classification. When using random forests...