-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save tradaboost model #109
Comments
Hi @971766904, Thank you for your interest in the Adapt library. To save and load the TrAdaBoost model, you can use Here is an example: import joblib
from adapt.utils import make_classification_da
from adapt.instance_based import TrAdaBoost
from lightgbm import LGBMClassifier
Xs, ys, Xt, yt = make_classification_da()
model = TrAdaBoost(estimator=LGBMClassifier(num_leaves=20))
model.fit(Xs, ys, Xt, yt)
# Save the fitted model
joblib.dump(model, "model.pkl")
# Load the model and make predictions
loaded_model = joblib.load("model.pkl")
loaded_model.predict(Xt) |
thank your for your reply |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to know how to save a model trained by tradaboost whose estimator is LGBMClassifier and how to load a saved model when I need to deploy on real time situation.
The text was updated successfully, but these errors were encountered: