Orange Forum • View topic - Persistent Classifiers?

Persistent Classifiers?

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

Persistent Classifiers?

Postby D.Hering » Fri Mar 25, 2005 0:47

Hi.

Is it possible to make a classifier persistent (ie: Pickled or saved to file) for future session use?

Or does Orange have to "re-learn" our empirical data, each time there are new instances to be "predicted".

We can't seem to determine this via the documentation.

Thank you,

Dieter Hering
Meridian Corp.

Postby Janez » Mon Mar 28, 2005 9:35

No, pickling (or any other kind of serialization) is not possible.

We've been toying with this idea for quite a while, but implementing it will require quite some changes in the way Orange objects are implemented (particularly, in the C to Python interface), so don't expect it anytime soon.

Postby Guest » Mon Mar 28, 2005 19:57

Hi Janez,

Wow, that's too bad for those with large size data.

Janez Please, for the sake of other people who study your fantastic sw...

Please, Please make that very clear in the documentation.


Thank you,
D.Hering

Postby Guest » Sat Apr 30, 2005 4:43

Hi,

I was just wondering...

Would it be at all possible to some how serialize the classifiers in native C++, and have some sort of API to Python?

PyCLIPS provides this kind of persistence through the CLIPS
API.

This an important feature.. to be able to utilize the trained classifiers in future sessions.

Or maybe auto-construct some kind of .txt configuation file that would act for persistence.

Thank you for your consideration, and for providing Orange publicly.

Postby Blaz » Sat Apr 30, 2005 7:32

One option (instead going through .txt) is to go through Predictive Model Markup Language (PMML, http://www.dmg.org/pmml-v3-0.html). We have already played with writers (Orange model -> PMML), and what would be still needed are loaders (PMML -> Orange).

Anybody willing to take the job, let us know and we can send the code for writers (naive bayesian classifier, decision trees covered so far).

Postby Guest » Mon May 02, 2005 15:53

I wish I were more knowledgeable at this time. I'd most certainly offer to help in any way I could.

Postby Janez » Wed May 04, 2005 18:12

PMML may be too limited. I'll take a look at PyCLIPS, but I fear that there is no tool that would take care of saving/restoring without me having to write interface functions and constructors for basically all orange classes. It's not the complexity of work that I fear (pickling is routine), I fear the amount of it.

Postby Guest » Sat May 07, 2005 13:42

Thank you very much for attempting to remedy this.

Postby Guest » Sat Jun 11, 2005 6:25

The ADaM app simply writes the classifier's (learner) parameters to a txt file for storage and usage by another method called "Apply".

Alex

Postby Fabrice C. » Tue Jan 10, 2006 9:34

I wholeheartly agree with the original posters : Pickling of the trained widgets appears to me of the highest priority as its absence seriously cripples the potential of the software.
A simple example : I toyed with your excellent "interactive tree builder" and spent half an hour creating by hand a custom tree and comparing it to an automatically generated one. Everything was fine, I saved my file, very glad of the results and the following day, everything was gone : when I reopened the schema, my work had disappeared and the widget had been reinitialised.
Luckily, I had printed out a Viewer2D version of my tree so all is not lost... it is however a nasty shortcoming to a potentially wonderful tool.

I humbly suggest you to give a serious second* thought about persistance, even if it is only for the interactive tree builder in a first step.


Fabrice Capiez

---
*(or third or nth, as I suspect you have already seriously considered the problem)

Re: Persistent Classifiers?

Postby algo » Fri Aug 08, 2014 21:34

I actually want to serialize a k-means clustering object, but this seems like a good place to ask about this.

In March of 2005, Janez told us not to expect any progress on being able to serialize objects in Orange anytime soon.

Well, it's now August of 2014... has any progress been made that will allow Orange users to serialize Orange objects so we can save trained models for use in later sessions?

Thanks in advance for any help with this question.

Re: Persistent Classifiers?

Postby algo » Fri Aug 08, 2014 21:45

Oops... sorry.

Now I see that you can Save a classifier to a file and Load a classifier from a file.

Maybe I'll start a new thread for my question about doing this for a k-means clustering object (which I do want to use as a classifier after it is trained.)


Return to Questions & Support