Hi. Afer trained a XGBoost model I need to get the leaf scores of all the boosters in ordered way in a unique file. For instance, if the index_leaf of booster0 are [5, 10, 7] and the related values are [0.01, -1.2, 0.08] what I need to have is a sparse matrix such as [0,0,0,0,0,0.001,0,0.08,0,0,-1.2]. Then I should append the ordered leaf scores of booster1, and so on. Is there a way to do it?
You can save the model in json or ubj format then customize it.