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

Method Check

catboost/libs/data/target.cpp:357–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355
356
357void TRawTargetData::Check(
358 const TObjectsGrouping& objectsGrouping,
359 NPar::ILocalExecutor* localExecutor
360) const {
361 ui32 objectCount = objectsGrouping.GetObjectCount();
362
363 // Weights's values have been already checked in it's constructor
364 CheckDataSize(Weights.GetSize(), objectCount, "Weights");
365
366
367 TVector<std::function<void()>> tasks;
368
369 tasks.emplace_back(
370 [&, this]() {
371 CheckRawTarget(TargetType, Target, objectCount);
372 }
373 );
374
375 for (auto i : xrange(Baseline.size())) {
376 tasks.emplace_back(
377 [&, i, this]() {
378 CheckOneBaseline(Baseline[i], i, objectCount);
379 }
380 );
381 }
382
383 tasks.emplace_back(
384 [&, this]() {
385 // GroupWeights's values have been already checked for non-negativeness in it's constructor
386 CheckGroupWeights(GroupWeights, objectsGrouping);
387 }
388 );
389
390 if (Pairs) {
391 tasks.emplace_back(
392 [&, this]() {
393 std::visit(
394 [&] (const auto& pairsData) {
395 CheckPairs(pairsData, objectsGrouping);
396 },
397 *Pairs
398 );
399 }
400 );
401 }
402 if (Graph) {
403 tasks.emplace_back(
404 [&, this]() {
405 std::visit(
406 [&] (const auto& pairsData) {
407 CheckPairs(pairsData, objectsGrouping);
408 },
409 *Graph
410 );
411 }
412 );
413 }
414

Callers 5

TTargetDataProviderMethod · 0.45
CrossValidateFunction · 0.45

Calls 15

CheckDataSizeFunction · 0.85
CheckRawTargetFunction · 0.85
xrangeFunction · 0.85
CheckOneBaselineFunction · 0.85
CheckGroupWeightsFunction · 0.85
CheckPairsFunction · 0.85
CheckTargetFunction · 0.85
MapFindPtrFunction · 0.85
CheckBaselineFunction · 0.85
NothingFunction · 0.85
TCatBoostExceptionClass · 0.85
visitFunction · 0.50

Tested by

no test coverage detected