From b4520641356dc920ece5b34de07c49cb5193d63d Mon Sep 17 00:00:00 2001 From: Paul Koch Date: Wed, 25 Dec 2024 13:24:10 -0800 Subject: [PATCH] exit before last cut (and also last bin) --- shared/libebm/PartitionOneDimensionalBoosting.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared/libebm/PartitionOneDimensionalBoosting.cpp b/shared/libebm/PartitionOneDimensionalBoosting.cpp index 261cf09f1..d1718fd91 100644 --- a/shared/libebm/PartitionOneDimensionalBoosting.cpp +++ b/shared/libebm/PartitionOneDimensionalBoosting.cpp @@ -372,7 +372,8 @@ static ErrorEbm Flatten(BoosterShell* const pBoosterShell, EBM_ASSERT(iEdge <= cBins); if(cBins == iEdge) { // this cut would isolate the missing bin, but missing already has a cut - break; + pInnerTermUpdate->SetCountSlices(iDimension, 1); + return Error_None; } } }