Re: [Scikit-learn-general] Save trained classifier

2013-12-19 Thread Fred Mailhot
On 19 December 2013 15:16, Olivier Grisel wrote: > [...] > But on the other hand that makes it possible to [...] to memory map the > large parameter > arrays by passing mmap_mode='r' to joblib.load for instance. > > Memory mapping can be useful to share the memory of models loaded in > several py

Re: [Scikit-learn-general] Save trained classifier

2013-12-19 Thread Juan Nunez-Iglesias
On Fri, Dec 20, 2013 at 9:15 AM, Su, Jian, Ph.D. wrote: > As Ryan pointed out, joblib is the solution. One bad thing is it creates > multiple files. > If I remember correctly, I fixed the multiple files issue by passing "compress=3" as a keyword argument to joblib.dump. That does prevent the mem

Re: [Scikit-learn-general] Save trained classifier

2013-12-19 Thread Olivier Grisel
2013/12/19 Su, Jian, Ph.D. : > Zach, > > You can save a classifier with pickle, but you need to train the > classifier after you load it, right? No all the internal state of the classifier is preserved as well. > As Ryan pointed out, joblib is the solution. One bad thing is it creates > multiple

Re: [Scikit-learn-general] Save trained classifier

2013-12-19 Thread Su, Jian, Ph.D.
Zach, You can save a classifier with pickle, but you need to train the classifier after you load it, right? As Ryan pointed out, joblib is the solution. One bad thing is it creates multiple files. On 12/19/13 4:06 PM, "Zach Dwiel" wrote: >which classifier are you using? I pickle trained Deci

Re: [Scikit-learn-general] Save trained classifier

2013-12-19 Thread Ryan Rosario
Sorry, joblib, not job lib. Friggin Outlook. -- r. From: Ryan Rosario mailto:rrosa...@fb.com>> Reply-To: "scikit-learn-general@lists.sourceforge.net" mailto:scikit-learn-general@lists.sourceforge.net>> Date: Thursday, December 19, 2013 2:05 PM

Re: [Scikit-learn-general] Save trained classifier

2013-12-19 Thread Zach Dwiel
which classifier are you using? I pickle trained DecisionTree and RandomForest classifiers, save them to disk and then load them up in production without a problem all the time. zach On Thu, Dec 19, 2013 at 5:00 PM, Su, Jian, Ph.D. wrote: > Is it possible to save the trained classifier and pass

Re: [Scikit-learn-general] Save trained classifier

2013-12-19 Thread Ryan Rosario
Yes, use job lib in sklean.externals. It has a similar interface to pickle. -- Ryan From: , , "Ph.D." mailto:su.j...@mayo.edu>> Reply-To: "scikit-learn-general@lists.sourceforge.net" mailto:scikit-learn-general@lists.sourceforge.net>> Date: Th

[Scikit-learn-general] Save trained classifier

2013-12-19 Thread Su, Jian, Ph.D.
Is it possible to save the trained classifier and pass it to other machine for direct prediction? I tried pickle which only saves the classifier parameters before training. -- Rapidly troubleshoot problems before they aff

Re: [Scikit-learn-general] Proper way to stack classifiers in scikit-learn

2013-12-19 Thread Joel Nothman
Unless it is an estimator with warm_start=True, fit() should not be affected by previous state (I hope I'm right in that :P). And there's no shame in doing cross-validation by hand =) But it would indeed be nice if stacking were easier in scikit-learn. On Fri, Dec 20, 2013 at 6:47 AM, José Ricar

Re: [Scikit-learn-general] Proper way to stack classifiers in scikit-learn

2013-12-19 Thread José Ricardo
Hi Joel, thank you for such a comprehensive answer. Only one more question, if you don't mind. I'm considering doing the cross-validation by hand. Are there any concerns on calling #fit multiple times on the same classifier (without cloning it)? Best regards, José On Wed, Dec 18, 2013 at 7:33

[Scikit-learn-general] Releasing joblib 0.8a

2013-12-19 Thread Olivier Grisel
Hi all, I have just pushed a fix to make joblib.Parallel work on the development version of Python that adds more flexibility to the way multiprocessing is spawning the worker process. See: http://docs.python.org/dev/library/multiprocessing.html#contexts-and-start-methods I think this along with