Using XGBOOST in c++

前端 未结 6 1651
谎友^
谎友^ 2020-12-13 01:14

How can I use XGBOOST https://github.com/dmlc/xgboost/ library in c++? I have founded Python and Java API, but I can\'t found API for c++

6条回答
  •  孤街浪徒
    2020-12-13 01:35

    In case training in Python is okay and you only need to run the prediction in C++, there is a nice tool for generating static if/else-code from a trained model:

    https://github.com/popcorn/xgb2cpp

    I ended up using this after spending a day trying to load and use a xgboost model in C++ without success. The code generated by xgb2cpp was working instantly and also has the nice benefit that it does not have any dependencies.

提交回复
热议问题