What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-12 12:21:03
sklearn save model
# fit the model model.fit(X_train, y_train) # save the model import pickle pickle.dump(model, open("model.pkl", "wb")) # load the model model = pickle.load(open("model.pkl", "rb")) # use model to predict y_pred =... Add solution -
Python 2021-10-11 11:44:11
save and load sklearn model PKL
model.fit(X_train, Y_train) # save the model to disk filename = 'finalized_model.sav' pickle.dump(model, open(filename, 'wb')) # load the model from disk loaded_model = pickle.load(open(filename, 'rb')) result = loaded_model.score(X_test, Y_test) Add solution -
Python 2021-09-29 19:38:05
model pickle file create
import pickle # save the model to disk filename = 'finalized_model.sav' pickle.dump(model, open(filename, 'wb')) # some time later... # load the model from disk loaded_model = pickle.load(open(filename, 'rb')) result = loaded_model.score(X_test, Y_te... Add solution -
Python 2021-09-15 13:20:03
python selenium save cookies
# read cookies import pickle import selenium.webdriver driver = selenium.webdriver.Firefox() driver.get("http://www.google.com") cookies = pickle.load(open("cookies.pkl", "rb")) for cookie in cookies: driver.add_cookie... Add solution -
Python 2021-09-09 09:41:02
save machine learning model
# fit the model model.fit(X_train, y_train) # save the model import pickle pickle.dump(model, open("model.pkl", "wb")) # load the model model = pickle.load(open("model.pkl", "rb")) # use model to predict y_pred =... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5