Skip to main content
. 2024 Feb 21;24(5):1399. doi: 10.3390/s24051399
Algorithm 2 Serial implementation of Random Forest
Input: input_data → Features, thresholds, left and right
            children’s nodes
1: Step 1: Development of the tree_structure function
2: The single tree outputs prob_array
3: Step 2: Building of the forest
4: for i=0 to ntrees1
5:  tree_structure(input_data,prob_array,i);
6:   Find max, index of prob_array maximum
7:   classmax++;
8: end
9: Find imax, index of the class maximum
Output: imax