Orange Forum • View topic - Saving/Loading Classifier

Saving/Loading Classifier

A place to ask questions about methods in Orange and how they are used and other general support.

Saving/Loading Classifier

Postby cs5080222 » Mon Jul 15, 2013 10:47


I am trying to save/load trained classifier using the python cPickle package. It works fine for simple classifiers such as bayes and knn. However, loading is giving an error for classifiers such as Boosted Learner and Bagged Learner

Here is the error:
cPickle.load(open('boosted_learner.pkl','rb')): TypeError: ('__new__() takes at least 2 arguments (1 given)'

Please tell me a way to get around this error or suggest some other method to save the trained classifier.


Re: Saving/Loading Classifier

Postby Ales » Tue Jul 16, 2013 9:28

This was a bug in orange (Boosted/Bagged/StackedLearner instances were not picklable). This should be fixed in the current source tree/snapshot builds. Can you please update Orange and try again.

Re: Saving/Loading Classifier

Postby cs5080222 » Tue Jul 16, 2013 12:16

Thanks Ales. It is working fine now :)

Return to Questions & Support