python - pickle.PicklingError: Can't pickle <function preprocessor at 0x109217488>: it's not found as __main__.preprocessor -


i need store machine learning classifier developed using sklearn. using joblib package this. here how it:

from sklearn.externals improt joblib  #clf defined above joblib.dump(clf,'test.clf') 

i having following error:

traceback (most recent call last):   file "svm_clf.py", line 333, in <module>   my_svm_classifier(get_best_model(), x, y, name="svm pos vs neg", plot=true)   file "svm_clf.py", line 300, in my_svm_classifier     joblib.dump(clf, 'neg.clf')   file "//anaconda/lib/python2.7/site-packages/sklearn/externals/joblib/numpy_pickle.py", line 369, in dump pickler.dump(value)  ... ... ...  pickle.picklingerror: can't pickle <function preprocessor @ 0x108301488>: it's not found \__main\__.preprocessor 

any help?


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -