Load saved model #268
Answered
by
Shashi9503
Shashi9503
asked this question in
Q&A
-
How can I load saved model and reuse it for prediction?? |
Beta Was this translation helpful? Give feedback.
Answered by
Shashi9503
Nov 2, 2021
Replies: 1 comment 1 reply
-
You can use pickle.load() to load the automl instance you saved and then predict without fitting again. Code example assuming your model is dumped into file 'automl.pkl' and test data is X_test: automl = pickle.load(open('automl.pkl', 'rb')) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Shashi9503
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use pickle.load() to load the automl instance you saved and then predict without fitting again.
Code example assuming your model is dumped into file 'automl.pkl' and test data is X_test:
automl = pickle.load(open('automl.pkl', 'rb'))
y_pred = automl.predict(X_test)
#228 (reply in thread)