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

Method LinesFileSampleByIndices

catboost/libs/data/sampler.cpp:138–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136
137
138TDataProviderPtr NCB::LinesFileSampleByIndices(const TDataProviderSampleParams& params, TConstArrayRef<ui32> indices) {
139 TVector<ui64> sortedIndices(indices.begin(), indices.end());
140 Sort(sortedIndices);
141
142 const auto& datasetReadingParams = params.DatasetReadingParams;
143
144 auto indexedDataReader = MakeHolder<TIndexedSubsetLineDataReader>(
145 GetLineDataReader(
146 datasetReadingParams.PoolPath,
147 datasetReadingParams.ColumnarPoolFormatParams.DsvFormat,
148 /*keepInOrder*/ true
149 ),
150 std::move(sortedIndices)
151 );
152
153 return DataProviderSamplerReorderByIndices(
154 params,
155 ReadDatasetForSampler(params, /*loadSampleIds*/false, std::move(indexedDataReader)),
156 indices
157 );
158}
159
160TDataProviderPtr NCB::DataProviderSamplerReorderBySampleIds(
161 const TDataProviderSampleParams& params,

Callers

nothing calls this directly

Calls 6

GetLineDataReaderFunction · 0.85
ReadDatasetForSamplerFunction · 0.85
SortFunction · 0.50
moveFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected