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

Method TExclusiveFeatureBundlesData

catboost/libs/data/objects.cpp:1325–1344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1323
1324
1325NCB::TExclusiveFeatureBundlesData::TExclusiveFeatureBundlesData(
1326 const NCB::TFeaturesLayout& featuresLayout,
1327 TVector<NCB::TExclusiveFeaturesBundle>&& metaData
1328)
1329 : MetaData(std::move(metaData))
1330 , SrcData(MetaData.size())
1331{
1332 FlatFeatureIndexToBundlePart.resize(featuresLayout.GetExternalFeatureCount());
1333
1334 for (ui32 bundleIdx : xrange(SafeIntegerCast<ui32>(MetaData.size()))) {
1335 const auto& bundle = MetaData[bundleIdx];
1336 for (ui32 inBundleIdx : xrange(SafeIntegerCast<ui32>(bundle.Parts.size()))) {
1337 TExclusiveBundleIndex exclusiveBundleIndex(bundleIdx, inBundleIdx);
1338 const auto& bundlePart = bundle.Parts[inBundleIdx];
1339 const ui32 flatFeatureIdx
1340 = featuresLayout.GetExternalFeatureIdx(bundlePart.FeatureIdx, bundlePart.FeatureType);
1341 FlatFeatureIndexToBundlePart[flatFeatureIdx] = exclusiveBundleIndex;
1342 }
1343 }
1344}
1345
1346
1347void NCB::TExclusiveFeatureBundlesData::GetSubsetWithScheduling(

Callers

nothing calls this directly

Calls 6

xrangeFunction · 0.85
GetExternalFeatureIdxMethod · 0.80
moveFunction · 0.50
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected