Skip to content

Commit

Permalink
fix minor bug in RF (#2089)
Browse files Browse the repository at this point in the history
  • Loading branch information
lordoz234 authored Mar 4, 2022
1 parent 4051164 commit fc46f5e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ bool UnorderedRespHelper<algorithmFPType, cpu>::findBestSplitOrderedFeature(cons
{
const algorithmFPType weights = this->_aWeights[aIdx[i]].val;
const bool bSameFeaturePrev(featureVal[i] <= featureVal[i - 1] + accuracy);
leftWeights += weights;
leftWeights += this->_aWeights[aIdx[i - 1]].val;
if (bSameFeaturePrev || (i < nMinSplitPart) || (leftWeights < minWeightLeaf) || (totalWeights - leftWeights < minWeightLeaf))
{
//can't make a split
Expand Down

0 comments on commit fc46f5e

Please sign in to comment.