|
Algorithm 1: The RF Algorithm |
| 1: defines the training data with
|
| 2: For to . |
| 3: Take a bootstrap sample of size from . |
| 4: Fit a tree using and binary recursive partitioning. |
| 5: Begin with all observations in a single node. |
| 6: Repeat for every unsplit node. |
| 7: Select predictors in a random manner from . |
| 8: Find the optimal binary split on the predictors. |
| 9: Apply the split. |
| 10: Until stopping criteria are met. |
| 11: To predict a new point x, use. |
|
where . |
| corresponds to the prediction of the response variable at using the tree. |