popcorn/xgb2cpp

Wrong feature indices from dump.raw.

Closed this issue · 2 comments

your regular expression seems not to get the right feature, instead it uses the note id.

feature_index = re.search('[^f]', level[0]).group(0)

which should be:

feature_index = re.search('f(\d+)', level[0]).group(1)

to use the feature index from sample.

Wow, I can't believe I had such an oversight. I'll accept your pull request right away.

Solved by merging pull request #2