Skip to main content
. 2021 Jan 30;21(3):930. doi: 10.3390/s21030930
Algorithm 1:Exact Greedy Algorithm for Split Finding.
Input: I, instance set of the current node
Input: d, feature dimension
gain←0
G←∑i∈Igi,H←∑i∈Ihi
for k=1 to m do
GL←0,HL←0
for j in sorted(I,by xjk) do
                                               GL←GL+gj,HL←HL+hj
                                               GR←G−GL,HR←H−HL
                                 score←max(score,GL2HL+λ+GR2HR+λ−G2H+λ)
end
end
Output: Split with max score