Is it possible export or save a model so that whenever i want i can run the model if so how should i do it?
1 comment
Leave a comment
You must be logged in to post a comment.
Is it possible export or save a model so that whenever i want i can run the model if so how should i do it?
You must be logged in to post a comment.
The library ‘pickle’ is used to save a machine learning model …
To Save a Machine Learning Model:
#############################################
# Import the pickle library
import pickle
# Save the trained model
model = pickle.dumps(model_object)
#############################################
To load the Machine Learning Model:
# Load the model
loaded_model = pickle.loads(model)
#############################################
Example: