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

Method PrepareForInitialization

catboost/libs/data/target.cpp:419–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417
418
419void TRawTargetData::PrepareForInitialization(
420 const TDataMetaInfo& metaInfo,
421 ui32 objectCount,
422 ui32 prevTailSize
423) {
424 TargetType = metaInfo.TargetType;
425
426 // Target is properly initialized at the end of building
427 Target.resize(metaInfo.TargetCount);
428
429 Baseline.resize(metaInfo.BaselineCount);
430 for (auto& dim : Baseline) {
431 NCB::PrepareForInitialization(objectCount, prevTailSize, &dim);
432 }
433
434 // if weights are not trivial reset at the end of building
435 // here they are set to trivial to clear previous buffers
436 SetTrivialWeights(objectCount);
437
438 Pairs.Clear();
439}
440
441
442ERawTargetType TRawTargetDataProvider::GetTargetType() const noexcept {

Callers

nothing calls this directly

Calls 3

PrepareForInitializationFunction · 0.85
resizeMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected