Learn Before
Concept

How Random Forest work?

Basic algorithm:

  1. Pick N random records from the dataset.

  2. Build a decision tree based on these N records.

  3. Choose the number of trees you want in your algorithm and repeat steps 1 and 2.

  4. In case of a regression problem, for a new record, each tree in the forest predicts a value for Y (output). The final value can be calculated by taking the average of all the values predicted by all the trees in the forest. Or, in the case of a classification problem, each tree in the forest predicts the category to which the new record belongs. Finally, the new record is assigned to the category that wins the majority vote.

0

1

Updated 2021-02-26

Tags

Data Science