| 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) { |
no test coverage detected