MCPcopy Create free account
hub / github.com/catboost/catboost / NeedToUseTreeLevelCaching

Function NeedToUseTreeLevelCaching

catboost/private/libs/algo/learn_context.cpp:823–834  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

821}
822
823bool NeedToUseTreeLevelCaching(
824 const NCatboostOptions::TCatBoostOptions& params,
825 ui32 maxBodyTailCount,
826 ui32 approxDimension) {
827
828 const ui32 maxLeafCount = 1 << params.ObliviousTreeOptions->MaxDepth;
829 // TODO(nikitxskv): Pairwise scoring doesn't use statistics from previous tree level. Need to fix it.
830 return (
831 IsSamplingPerTree(params.ObliviousTreeOptions) &&
832 !IsPairwiseScoring(params.LossFunctionDescription->GetLossFunction()) &&
833 maxLeafCount * approxDimension * maxBodyTailCount < 64 * 1 * 10);
834}
835
836bool UseAveragingFoldAsFoldZero(const TLearnContext& ctx) {
837 const auto lossFunction = ctx.Params.LossFunctionDescription->GetLossFunction();

Callers 2

DoMapMethod · 0.85
TLearnContextMethod · 0.85

Calls 3

IsSamplingPerTreeFunction · 0.85
IsPairwiseScoringFunction · 0.85
GetLossFunctionMethod · 0.45

Tested by

no test coverage detected