[catboost] always use linear search for quantization; lower_bound provided inconsistent results for exact match
#include <catboost/libs/options/enums.h>
#include <catboost/libs/helpers/exception.h>
-#include <util/generic/algorithm.h>
#include <util/generic/array_ref.h>
#include <util/generic/ymath.h>
@@ -14,14 +13,10 @@ namespace NCB {
return ENanMode::Min == nanMode ? 0 : borders.size();
}
- if (borders.size() <= 50) {
size_t index = 0;
while (index < borders.size() && borders[index] < value) {
++index;
}
return index;
}
-
- return LowerBound(borders.begin(), borders.end(), value) - borders.begin();
- }
}
