| 98 | } |
| 99 | |
| 100 | inline void UpdateGpuSpecificDefaults(NCatboostOptions::TCatBoostOptions& options, |
| 101 | TBinarizedFeaturesManager& featuresManager) { |
| 102 | //don't make several permutations in matrixnet-like mode if we don't have ctrs |
| 103 | if (!HasPermutationFeatures(featuresManager) && options.BoostingOptions->BoostingType == EBoostingType::Plain) { |
| 104 | if (options.BoostingOptions->PermutationCount > 1) { |
| 105 | CATBOOST_DEBUG_LOG << "No catFeatures for ctrs found and don't look ahead is disabled. Fallback to one permutation" << Endl; |
| 106 | } |
| 107 | options.BoostingOptions->PermutationCount = 1; |
| 108 | } else { |
| 109 | if (options.BoostingOptions->PermutationCount > 1) { |
| 110 | if (options.ObliviousTreeOptions->LeavesEstimationMethod.IsDefault() && |
| 111 | options.ObliviousTreeOptions->LeavesEstimationMethod == ELeavesEstimation::Simple) |
| 112 | { |
| 113 | options.ObliviousTreeOptions->LeavesEstimationMethod.SetDefault(ELeavesEstimation::Newton); |
| 114 | } |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | NCatboostOptions::TOption<ui32>& blockSizeOption = options.BoostingOptions->PermutationBlockSize; |
| 119 | if (!blockSizeOption.IsSet() || blockSizeOption == 0u) { |
| 120 | blockSizeOption.Set(64); |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | static inline bool NeedPriorEstimation(const TVector<NCatboostOptions::TCtrDescription>& descriptions) { |
| 125 | for (const auto& description : descriptions) { |
no test coverage detected