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

Function IsFloatFeatureToBeBinarized

catboost/libs/data/quantization.cpp:2096–2118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2094 }
2095
2096 static bool IsFloatFeatureToBeBinarized(
2097 const TQuantizationOptions& options,
2098 TQuantizedFeaturesInfo& quantizedFeaturesInfo, // non const because of GetRWMutex
2099 TFloatFeatureIdx floatFeatureIdx
2100 ) {
2101 if (!options.PackBinaryFeaturesForCpu) {
2102 return false;
2103 }
2104
2105 {
2106 TReadGuard guard(quantizedFeaturesInfo.GetRWMutex());
2107
2108 if (quantizedFeaturesInfo.GetFeaturesLayout()->GetInternalFeatureMetaInfo(
2109 *floatFeatureIdx,
2110 EFeatureType::Float
2111 ).IsAvailable &&
2112 (quantizedFeaturesInfo.GetBorders(floatFeatureIdx).size() == 1))
2113 {
2114 return true;
2115 }
2116 }
2117 return false;
2118 }
2119
2120 static bool IsCatFeatureToBeBinarized(
2121 const TQuantizationOptions& options,

Callers 1

DoMethod · 0.85

Calls 3

GetFeaturesLayoutMethod · 0.45
sizeMethod · 0.45
GetBordersMethod · 0.45

Tested by

no test coverage detected