popcorn / xgb2cpp

Converts XGBoost raw model dumps to C++ code.
MIT License
64 stars 26 forks source link

how to use the code #3

Open amenglar opened 6 years ago

amenglar commented 6 years ago

Dear Sir, I am working on a project using xgboost, which I have to use c++ code. Your idea is really awesome. Thank you! I trained a model(classification of 0 and 1) with a medical dataset and tested with a piece of specific sample. I'v got a negative result(0). I dumped the model and used your code to generate a cpp code. Then I got two possibilities of 0.44 and 0.55. The results seem not the same if I understand it correctly.

From what I know, the model is a number of trees. And the sample goes through them. Normally I will get only one number? How does it give me two numbers, and possibilities based on them?

best wishes, Jako