dotnet / machinelearning

ML.NET is an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
8.92k stars 1.86k forks source link

Calling predict from LightGBM model file load #7032

Open scott19896 opened 4 months ago

scott19896 commented 4 months ago

System information

Issue

Following on from https://github.com/dotnet/machinelearning/pull/6569

Are there any examples of how to load the LGBM model file and call predict on an entry by entry basis?

Looking at the Booster wrapper, the GetModel call is private and so the only interface I could see to access the model is through the trainer. This only provides that access when calling Fit however, which is not needed from what I can tell when loading a pre-trained model.

Would you know if this is something that is supported? In other words, load a pre-trained LGBM model text file and access the Booster to call predicts

Thanks!