diff --git a/shared/libebm/GenerateTermUpdate.cpp b/shared/libebm/GenerateTermUpdate.cpp index 53783019e..8a365c975 100644 --- a/shared/libebm/GenerateTermUpdate.cpp +++ b/shared/libebm/GenerateTermUpdate.cpp @@ -949,7 +949,8 @@ EBM_API_BODY ErrorEbm EBM_CALLING_CONVENTION GenerateTermUpdate(void* rng, // are going to remain having 0 splits. pBoosterShell->GetInnerTermUpdate()->Reset(); - if(IntEbm{0} == lastDimensionLeavesMax || (1 != cRealDimensions && MONOTONE_NONE != monotoneDirection)) { + if(IntEbm{0} == lastDimensionLeavesMax || + ((1 != cRealDimensions || bNominal || 1 != cScores) && MONOTONE_NONE != monotoneDirection)) { // this is kind of hacky where if any one of a number of things occurs (like we have only 1 leaf) // we sum everything into a single bin. The alternative would be to always sum into the tensor bins // but then collapse them afterwards into a single bin, but that's more work. diff --git a/shared/libebm/PartitionOneDimensionalBoosting.cpp b/shared/libebm/PartitionOneDimensionalBoosting.cpp index 72a3b85b7..7d581b294 100644 --- a/shared/libebm/PartitionOneDimensionalBoosting.cpp +++ b/shared/libebm/PartitionOneDimensionalBoosting.cpp @@ -779,9 +779,13 @@ template class PartitionOneDimensionalBoo EBM_ASSERT(2 <= cBins); // filter these out at the start where we can handle this case easily EBM_ASSERT(1 <= cSplitsMax); // filter these out at the start where we can handle this case easily EBM_ASSERT(nullptr != pTotalGain); + EBM_ASSERT(!bNominal || MONOTONE_NONE == monotoneDirection); BoosterCore* const pBoosterCore = pBoosterShell->GetBoosterCore(); const size_t cScores = GET_COUNT_SCORES(cCompilerScores, pBoosterCore->GetCountScores()); + + EBM_ASSERT(1 == cScores || MONOTONE_NONE == monotoneDirection); + const size_t cBytesPerBin = GetBinSize(true, true, bHessian, cScores); auto* const pRootTreeNode = pBoosterShell->GetTreeNodesTemp(); pRootTreeNode->Init();