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

Class TFloatFeatureBucketRange

catboost/libs/fstr/partial_dependence.cpp:14–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12
13namespace {
14 struct TFloatFeatureBucketRange {
15 int FeatureIdx = -1;
16 int Start = 0;
17 int End = -1;
18 int NumOfBuckets = 0;
19
20 TFloatFeatureBucketRange() = default;
21
22 TFloatFeatureBucketRange(int featureIdx, int numOfBorders)
23 : FeatureIdx(featureIdx)
24 , Start(0)
25 , End(numOfBorders + 1)
26 , NumOfBuckets(numOfBorders + 1)
27 {
28 }
29
30 void Update(int borderIdx, bool isGreater) {
31 if (isGreater && borderIdx >= Start) {
32 Start = borderIdx + 1;
33 } else if (!isGreater && borderIdx < End) {
34 End = borderIdx + 1;
35 }
36 }
37 };
38} //anonymous
39
40TVector<TFloatFeatureBucketRange> PrepareFeatureRanges(

Callers 1

PrepareFeatureRangesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected