| 1277 | |
| 1278 | |
| 1279 | void NCB::DbgDumpQuantizedFeatures( |
| 1280 | const NCB::TQuantizedObjectsDataProvider& quantizedObjectsDataProvider, |
| 1281 | IOutputStream* out |
| 1282 | ) { |
| 1283 | const auto& featuresLayout = *quantizedObjectsDataProvider.GetFeaturesLayout(); |
| 1284 | |
| 1285 | NPar::TLocalExecutor localExecutor; |
| 1286 | |
| 1287 | featuresLayout.IterateOverAvailableFeatures<EFeatureType::Float>( |
| 1288 | [&] (TFloatFeatureIdx floatFeatureIdx) { |
| 1289 | auto feature = quantizedObjectsDataProvider.GetFloatFeature(*floatFeatureIdx); |
| 1290 | if (!feature) |
| 1291 | return; |
| 1292 | |
| 1293 | (*feature)->ForEachBlock( |
| 1294 | [out, floatFeatureIdx] (size_t blockStartOffset, auto block) { |
| 1295 | for (auto i : xrange(block.size())) { |
| 1296 | auto objectIdx = i + blockStartOffset; |
| 1297 | (*out) << "(floatFeature=" << *floatFeatureIdx << ',' << LabeledOutput(objectIdx) |
| 1298 | << ").bin=" << ui32(block[i]) << Endl; |
| 1299 | } |
| 1300 | } |
| 1301 | ); |
| 1302 | } |
| 1303 | ); |
| 1304 | |
| 1305 | featuresLayout.IterateOverAvailableFeatures<EFeatureType::Categorical>( |
| 1306 | [&] (TCatFeatureIdx catFeatureIdx) { |
| 1307 | auto feature = quantizedObjectsDataProvider.GetCatFeature(*catFeatureIdx); |
| 1308 | if (!feature) |
| 1309 | return; |
| 1310 | |
| 1311 | (*feature)->ForEachBlock( |
| 1312 | [out, catFeatureIdx] (size_t blockStartOffset, auto block) { |
| 1313 | for (auto i : xrange(block.size())) { |
| 1314 | auto objectIdx = i + blockStartOffset; |
| 1315 | (*out) << "(catFeature=" << *catFeatureIdx << ',' << LabeledOutput(objectIdx) |
| 1316 | << ").bin=" << ui32(block[i]) << Endl; |
| 1317 | } |
| 1318 | } |
| 1319 | ); |
| 1320 | } |
| 1321 | ); |
| 1322 | } |
| 1323 | |
| 1324 | |
| 1325 | NCB::TExclusiveFeatureBundlesData::TExclusiveFeatureBundlesData( |
nothing calls this directly
no test coverage detected