no permutation in plain mode if only float features
@@ -117,7 +117,8 @@ void TLearnContext::InitContext(const TDataset& learnData, const TDataset* testD
auto lossFunction = Params.LossFunctionDescription->GetLossFunction();
//const auto sampleCount = data.GetSampleCount();
int foldCount = Max<ui32>(Params.BoostingOptions->PermutationCount - 1, 1);
- if (Params.BoostingOptions->BoostingType == EBoostingType::Plain && IsCategoricalFeaturesEmpty(learnData.AllFeatures)) {
+ const bool noCtrs = IsCategoricalFeaturesEmpty(learnData.AllFeatures);
+ if (Params.BoostingOptions->BoostingType == EBoostingType::Plain && noCtrs) {
foldCount = 1;
}
LearnProgress.Folds.reserve(foldCount);
@@ -135,6 +136,9 @@ void TLearnContext::InitContext(const TDataset& learnData, const TDataset* testD
if (foldPermutationBlockSize == FoldPermutationBlockSizeNotSet) {
foldPermutationBlockSize = DefaultFoldPermutationBlockSize(learnData.GetSampleCount());
}
+ if (IsPlainMode(Params.BoostingOptions->BoostingType) and noCtrs) {
+ foldPermutationBlockSize = learnData.GetSampleCount();
+ }
const auto storeExpApproxes = IsStoreExpApprox(Params);
if (IsPlainMode(Params.BoostingOptions->BoostingType)) {
