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

Method CreateCombinationCtrForType

catboost/cuda/data/binarizations_manager.cpp:246–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244 }
245
246 TVector<ui32> TBinarizedFeaturesManager::CreateCombinationCtrForType(ECtrType type) {
247 TSet<ui32> resultIds;
248
249 for (auto& combination : UserCombinations) {
250 if (combination.Description.Type != type) {
251 continue;
252 }
253 TMap<ECtrType, TSet<TCtrConfig>> configs;
254 CreateCtrConfigsFromDescription(combination.Description, &configs);
255 if (configs.contains(type)) {
256 for (auto& ctrConfig : configs[type]) {
257 TCtr ctr;
258 ctr.FeatureTensor = combination.Tensor;
259 ctr.Configuration = ctrConfig;
260
261 if (!KnownCtrs.contains(ctr)) {
262 AddCtr(ctr);
263 }
264 resultIds.insert(GetId(ctr));
265 }
266 }
267 }
268 return TVector<ui32>(resultIds.begin(), resultIds.end());
269 }
270
271 void TBinarizedFeaturesManager::CreateSimpleCtrs(const ui32 featureId, const TSet<TCtrConfig>& configs,
272 TSet<ui32>* resultIds) {

Callers 1

GetLearnFeatureIdsMethod · 0.80

Calls 4

containsMethod · 0.45
insertMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected