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

Function UpdateDeltaCount

catboost/private/libs/algo/scoring.cpp:228–249  ·  view source on GitHub ↗

Update not bootstraped sums on docIndexRange in a bucket

Source from the content-addressed store, hash-verified

226
227// Update not bootstraped sums on docIndexRange in a bucket
228inline static void UpdateDeltaCount(
229 const TStatsIndexer& indexer,
230 const double* derivatives,
231 const float* learnWeights,
232 NCB::TIndexRange<int> docIndexRange,
233 TBucketStats* stats
234) {
235 DispatchByBitsPerValue(
236 [=] (const auto* quantizedValues) {
237 DispatchGenericLambda(
238 [=] (auto haveWeights, auto isOneNode) {
239 for (int doc : docIndexRange.Iter()) {
240 auto& leafStats = stats[indexer.GetIndex<isOneNode>(doc, quantizedValues)];
241 leafStats.SumDelta += derivatives[doc];
242 leafStats.Count += haveWeights ? learnWeights[doc] : 1;
243 }
244 },
245 learnWeights != nullptr, indexer.Depth == 0);
246 },
247 indexer.BitsPerValue,
248 indexer.QuantizedValues);
249}
250
251
252inline static void CalcStatsKernel(

Callers 1

CalcStatsKernelFunction · 0.85

Calls 3

DispatchByBitsPerValueFunction · 0.85
DispatchGenericLambdaFunction · 0.85
IterMethod · 0.45

Tested by

no test coverage detected