CatBoost uses oblivious trees: every node on the same level applies the same split. So a sample's leaf is fully determined by the outcome of each level's split, which is a binary code.
Implement oblivious_leaf_index(bits), converting the level outcomes into an integer leaf index.
k has weight 2 ** k.Sum each bit times its power of two.
No results yet
Run your code to check it against the examples, or submit to run every test.