1# could use: import pickle... however let's do something else
2from sklearn.externals import joblib
3
4# this is more efficient than pickle for things like large numpy arrays
5# ... which sklearn models often have.
6
7# then just 'dump' your file
8joblib.dump(clf, 'my_dope_model.pkl')
9