详细参考代码
from sklearn import svm
from sklearn import datasets
from sklearn.externals import joblib
### 各种计算,这里仅是例子
clf = svm.SVC()
iris = datasets.load_iris()
X, y = iris.data, iris.target
clf.fit(X, y)
### 保存到硬盘,此时Saved_model001.pkl,并且读取(调用Sample已提供)
joblib.dump(clf, 'Saved_model001.pkl')
clf2 = joblib.load('Saved_model001.pkl')
print(clf2.predict(X[0:1]))