python xgboost continue training on existing model

前端 未结 1 1360
北海茫月
北海茫月 2021-02-10 11:20

Lets say I build an xgboost model:

bst = xgb.train(param0, dtrain1, num_round, evals=[(dtrain, \"training\")])

Where:

  • param0 is
相关标签:
1条回答
  • 2021-02-10 11:51

    You don't even have to load the model from the disk and retrain.

    All you need to do is the same xgb.train command with additional parameter: xgb_model= (either xgboost model full path name you've saved like in the question or a Booster object).

    Example:

    bst = xgb.train(param0, dtrain2, num_round, evals=[(dtrain, "training")], xgb_model='xgbmodel')
    

    Good luck!

    0 讨论(0)
提交回复
热议问题