Search code examples
pythonmachine-learningscikit-learnlightgbm

Updating an LGBM model with new data


I want to use additional data to 'update' an already trained Light Gradient Boosting Model (LGBM). Is there a way to do that?

I am looking for an approach that uses the Skealrn API and thus can be used in a pipeline.


Solution

  • An LGBM model in python can be fitted both with the original model API and with the Sklearn API. I couldn't find any examples of using the Sklearn API for continuous learning. Regardless of that, you can fit a model either way and it is compatible with the .train() function from the original API. It can be saved with save_model() or with joblib.dump().

    This does not affect its compatibility with Python Pileline() - it is perfectly compatible.