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

Function ReadTrainDatasets

catboost/libs/data/load_data.cpp:201–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199 }
200
201 TDataProviders ReadTrainDatasets(
202 TMaybe<ETaskType> taskType,
203 const NCatboostOptions::TPoolLoadParams& loadOptions,
204 EObjectsOrder objectsOrder,
205 bool readTestData,
206 TDatasetSubset learnDatasetSubset,
207 TConstArrayRef<TDatasetSubset> testDatasetSubsets,
208 bool forceUnitAutoPairWeights,
209 TMaybe<TVector<NJson::TJsonValue>*> classLabels,
210 NPar::ILocalExecutor* const executor,
211 TProfileInfo* const profile
212 ) {
213 if (readTestData) {
214 loadOptions.Validate();
215 } else {
216 loadOptions.ValidateLearn();
217 }
218
219 TDataProviders dataProviders;
220
221 if (loadOptions.LearnSetPath.Inited()) {
222 CATBOOST_DEBUG_LOG << "Loading features..." << Endl;
223 auto start = Now();
224 dataProviders.Learn = ReadDataset(
225 taskType,
226 loadOptions.LearnSetPath,
227 loadOptions.PairsFilePath,
228 loadOptions.GraphFilePath,
229 loadOptions.GroupWeightsFilePath,
230 loadOptions.TimestampsFilePath,
231 loadOptions.BaselineFilePath,
232 loadOptions.FeatureNamesPath,
233 loadOptions.PoolMetaInfoPath,
234 loadOptions.ColumnarPoolFormatParams,
235 loadOptions.IgnoredFeatures,
236 objectsOrder,
237 learnDatasetSubset,
238 /*loadSampleIds*/ false,
239 forceUnitAutoPairWeights,
240 classLabels,
241 executor
242 );
243 CATBOOST_DEBUG_LOG << "Loading features time: " << (Now() - start).Seconds() << Endl;
244 if (profile) {
245 profile->AddOperation("Build learn pool");
246 }
247 }
248 dataProviders.Test.resize(0);
249
250 if (readTestData) {
251 CATBOOST_DEBUG_LOG << "Loading test..." << Endl;
252 for (int testIdx = 0; testIdx < loadOptions.TestSetPaths.ysize(); ++testIdx) {
253 const NCB::TPathWithScheme& testSetPath = loadOptions.TestSetPaths[testIdx];
254 const NCB::TPathWithScheme& testPairsFilePath =
255 testIdx == 0 ? loadOptions.TestPairsFilePath : NCB::TPathWithScheme();
256 const NCB::TPathWithScheme& testGraphFilePath =
257 testIdx == 0 ? loadOptions.TestGraphFilePath : NCB::TPathWithScheme();
258 const NCB::TPathWithScheme& testGroupWeightsFilePath =

Callers 4

LoadPoolsFunction · 0.85
mode_eval_featureFunction · 0.85
DoMapMethod · 0.85
LoadPoolsFunction · 0.85

Calls 12

ReadDatasetFunction · 0.85
ValidateLearnMethod · 0.80
AddOperationMethod · 0.80
TPathWithSchemeClass · 0.70
NowFunction · 0.50
moveFunction · 0.50
ValidateMethod · 0.45
InitedMethod · 0.45
SecondsMethod · 0.45
resizeMethod · 0.45
ysizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected