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