2
$\begingroup$

If you have built two different xgbost models, with say 100 trees each, is it possible to combine into an xgboost model with 200 trees?

$\endgroup$

2 Answers 2

0
$\begingroup$

No: the trees' results are added together to produce the final score, so combining two models would produce outputs roughly twice as large as desired. (Gradient boosted trees change the target labels being fitted by each tree, so the 101st tree has "reset" the targets when training.)

$\endgroup$
2
  • $\begingroup$ The option of adding an already trained model will just ensure that the model will train from those hyper parameters? $\endgroup$ Mar 31, 2020 at 6:19
  • 1
    $\begingroup$ @NextDoorEngineer I'm not sure what you mean. If you mean passing the xgb_model parameter to train or fit methods, that's training continuation: the new trees are fitted as though you were continuing to train that old model with more trees (not starting from scratch). $\endgroup$
    – Ben Reiniger
    Mar 31, 2020 at 16:23
0
$\begingroup$

I don't think Tree models are working in that way. Nodes in XGBoost models depend on features and data you provide to model for training.

However, it is quite possible and better way to combine outputs of XGBoost with another tree model if you want to boost your modals

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.