'IBM Cloud Data Pak
How can I export a trained model using pickle in IBM Cloud Data Pak?
Example:
from sklearn.model_selection import train_test_split
x_train, x_test, y_train, y_test = train_test_split(x,y,test_size=0.2,random_state=10)
from sklearn.linear_model import LinearRegression
lr = LinearRegression()
lr.fit(x_train, y_train)
lr.score(x_test, y_test)
# What I did is below and I can't find the model saved anywhere
import pickle
with open('model.pickle', 'wb') as f:
pickle.dump(lr,f)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
