Skip to content

Commit 8022e33

Browse files
author
Shahab Moradi
committed
Addressed PR comments.
1 parent 345e6b9 commit 8022e33

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Microsoft.ML.FastTree/GamTrainer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,7 @@ private int CreateBalancedTreeRecursive(int lower, int upper,
11071107
// This is postorder traversal algorithm and populating the internalNodeIndices/lte/gt lists in reverse.
11081108
// Preorder is the only option, because we need the results of both left/right recursions for populating the lists.
11091109
// As a result, lists are populated in reverse, because the root node should be the first item on the lists.
1110+
// Binary search tree algorithm (recursive splitting to half) is used for creating balanced tree.
11101111
var mid = (lower + upper) / 2;
11111112
var left = CreateBalancedTreeRecursive(
11121113
lower, mid - 1, internalNodeIndices, lteChild, gtChild, ref internalNodeId);

0 commit comments

Comments
 (0)