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

Method GetBinCount

catboost/cuda/data/binarizations_manager.cpp:176–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174 }
175
176 ui32 TBinarizedFeaturesManager::GetBinCount(ui32 localId) const {
177 if (HasBorders(localId)) {
178 return GetBorders(localId).size() + 1;
179 } else if (IsCat(localId)) {
180 return GetUniqueValuesCounts(localId).OnAll;
181 } else if (InverseCtrs.contains(localId)) {
182 return GetBinarizationDescription(InverseCtrs[localId]).BorderCount + 1;
183 } else if (IsFloat(localId)) {
184 return 0;
185 } else if (IsEstimatedFeature(localId)) {
186 return EstimatedFeatureUpperBoundHints.at(localId);
187 } else if (IsFeatureBundle(localId)) {
188 return LearnExclusiveFeatureBundles.at(FeatureManagerIdToExclusiveBundleId.at(localId)).GetBinCount();
189 } else {
190 ythrow TCatBoostException() << "Error: unknown feature id #" << localId;
191 }
192 }
193
194 ui32 TBinarizedFeaturesManager::AddCtr(const TCtr& ctr) {
195 CB_ENSURE(!KnownCtrs.contains(ctr));

Callers 15

GetBucketCountFunction · 0.45
WriteFloatFeaturesMethod · 0.45
GetFoldsCountMethod · 0.45
GetGroupingLevelMethod · 0.45
GetLearnFeatureIdsMethod · 0.45
AddFeatureTensorMethod · 0.45
BuildCompressedBinsMethod · 0.45

Calls 4

IsFloatFunction · 0.50
sizeMethod · 0.45
containsMethod · 0.45
atMethod · 0.45

Tested by 7

CheckDataSetFunction · 0.36
TestTreeBuilderFunction · 0.36
TreeSearcherTestFunction · 0.36
RunComputeTestFunction · 0.36