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

Function ShuffleLearnDataIfNeeded

catboost/private/libs/algo/preprocess.cpp:183–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183TDataProviderPtr ShuffleLearnDataIfNeeded(
184 const NCatboostOptions::TCatBoostOptions& catBoostOptions,
185 TDataProviderPtr learnData,
186 NPar::ILocalExecutor* localExecutor,
187 TRestorableFastRng64* rand) {
188
189 if (NeedShuffle(
190 learnData->MetaInfo.FeaturesLayout->GetCatFeatureCount(),
191 learnData->ObjectsData->GetObjectCount(),
192 catBoostOptions
193 )) {
194 auto objectsGroupingSubset = NCB::Shuffle(learnData->ObjectsGrouping, 1, rand);
195 return learnData->GetSubset(
196 objectsGroupingSubset,
197 ParseMemorySizeDescription(catBoostOptions.SystemOptions->CpuUsedRamLimit.Get()),
198 localExecutor
199 );
200 }
201 return learnData;
202}

Callers 3

LoadPoolsFunction · 0.85
TrainModelFunction · 0.85
ModelBasedEvalFunction · 0.85

Calls 7

NeedShuffleFunction · 0.85
GetCatFeatureCountMethod · 0.80
ShuffleFunction · 0.50
GetObjectCountMethod · 0.45
GetSubsetMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected