Can i train mml-lgb model and loading in local Python?
See original GitHub issueCode like below
from mmlspark.lightgbm import LightGBMClassifier
model =LightGBMClassifier(boostingType='gbdt',
objective='binary',
baggingFreq=5,
learningRate=0.1,
numIterations=50,
earlyStoppingRound=10,
featuresCol = 'features',
categoricalSlotNames = cate_list,
numLeaves=30,
labelCol="label").fit(train)
model.saveNativeModel(path)
from sklearn.externals import joblib
clf = joblib.load(path)
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Save and Load Machine Learning Models in Python with scikit ...
In this post you will discover how to save and load your machine learning model in Python using scikit-learn. This allows you to...
Read more >python - Do I need to compile the model again after loading ...
yes. Save your model as .h5. When you want to train your model, load it again and do a model.fit as normal. Make...
Read more >Save and load models | TensorFlow Core
Model progress can be saved during and after training. This means a model can resume where it left off and avoid long training...
Read more >Saving and Loading Models (Coding TensorFlow) - YouTube
Training models can take a very long time, and you definitely don't want to have to retrain everything over a single mishap.
Read more >Save and load models in Tensorflow - GeeksforGeeks
As a result, a model will pick up where it left off to eliminate lengthy training periods. You can still share your model...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
you can create the python booster from model str: https://github.com/microsoft/LightGBM/issues/2097 model = lgb.Booster({‘model_str’: buf.read().decode(“UTF-8”)}) you can also create the scikit-learn API but it’s not “officially supported”: https://github.com/microsoft/LightGBM/issues/1942
Thanks,I finished the project alreday.