Skip to main content
. 2021 Mar 27;21(7):2339. doi: 10.3390/s21072339
Algorithm 1: The RF Algorithm
1: D={(x1,y1),,(xN,yN)} defines the training data with xi=(xi,1,,xi,p)T.
2: For j=1 to J.
3: Take a bootstrap sample Dj of size N from D.
4: Fit a tree using Dj and binary recursive partitioning.
5: Begin with all observations in a single node.
6: Repeat for every unsplit node.
7: Select m predictors in a random manner from p.
8: Find the optimal binary split on the m predictors.
9: Apply the split.
10: Until stopping criteria are met.
11: To predict a new point x, use.
f^(x)=argmaxyj=1JI(hj^(x)=y) where hj^(x).
corresponds to the prediction of the response variable at x using the jth tree.