I have already trained models with xgboost package in binary format( .bin) and I want to convert it to root or xml format in order to be used to evaluate in TMVA. Is there any convertor or an example of how to convert it?
import ROOT
import xgboost as xgb
ele =xgb.Booster()
ele.load_model(‘my_XGB.weights.bin’)
ROOT.TMVA.SaveXGBoost(ele, “myBDT”, “model.root”)
But it seems the last command is not working and giving the following error
Traceback (most recent call last):
File “”, line 1, in
AttributeError: <namespace cppyy.gbl.TMVA at 0x12f8fea60> has no attribute ‘SaveXGBoost’. Full details:
type object ‘TMVA’ has no attribute ‘SaveXGBoost’
‘TMVA::SaveXGBoost’ is not a known C++ class
‘SaveXGBoost’ is not a known C++ template
‘SaveXGBoost’ is not a known C++ enum
Is SaveXGBoost already implemented or this is something under development?