[Scikit-learn-general] ImportError

2011-10-07 Thread Isaac Laughlin
I'm getting an ImportError after installation that reads: >>> import sklearn Traceback (most recent call last): File "", line 1, in File "sklearn/__init__.py", line 19, in raise ImportError("Please do not forget to run `make` first") ImportError: Please do not forget to run `make` first

Re: [Scikit-learn-general] Memory consumption of LinearSVC.fit

2011-10-07 Thread Olivier Grisel
2011/10/7 Ian Goodfellow : > Thanks. Yes it does appear that liblinear uses only a 64 bit dense format, > so this memory usage is normal/caused by the implementation of liblinear. > > You may want to update the documentation hosted at this site: > http://scikit-learn.sourceforge.net/modules/svm.htm

Re: [Scikit-learn-general] Memory consumption of LinearSVC.fit

2011-10-07 Thread Olivier Grisel
2011/10/7 Mathieu Blondel : > By the way, I suspect that that predict method is also sub-optimal > because, since the support vectors and the coefficients are stored in > numpy arrays or scipy matrices, predict has to make the conversion to > liblinear's model structure at every call. This is the p

Re: [Scikit-learn-general] Memory consumption of LinearSVC.fit

2011-10-07 Thread Mathieu Blondel
By the way, I suspect that that predict method is also sub-optimal because, since the support vectors and the coefficients are stored in numpy arrays or scipy matrices, predict has to make the conversion to liblinear's model structure at every call. This is the price that we currently pay for pickl

Re: [Scikit-learn-general] Memory consumption of LinearSVC.fit

2011-10-07 Thread Mathieu Blondel
For dense-data, I recommend SGDClassifier or SVC if you want to use a kernel. I'm thinking that in the mid-term we may want to ship our own Cython implementation of liblinear (from what I saw, it didn't seem that hard to implement). Mathieu ---

Re: [Scikit-learn-general] Memory consumption of LinearSVC.fit

2011-10-07 Thread Olivier Grisel
2011/10/7 Gael Varoquaux : > On Fri, Oct 07, 2011 at 08:44:53AM +, bdho...@gmail.com wrote: >> I just wanted to say that we have similar problems in our lab >> which we "solved" by buying more RAM. >> It would be great to have single precision implementations >> of both SGDClassifier and Linear

Re: [Scikit-learn-general] Memory consumption of LinearSVC.fit

2011-10-07 Thread Olivier Grisel
2011/10/7 : > We wrestled with exactly this issue for decision trees, so its clear now that > a general solution would be very beneficial to scikit-learn. For liblinear it might be a bit complicated since both the C++ code and the cython wrapper would have to be rewritten to generate the two ver

Re: [Scikit-learn-general] Memory consumption of LinearSVC.fit

2011-10-07 Thread Gael Varoquaux
On Fri, Oct 07, 2011 at 08:44:53AM +, bdho...@gmail.com wrote: > I just wanted to say that we have similar problems in our lab > which we "solved" by buying more RAM. > It would be great to have single precision implementations > of both SGDClassifier and LinearSVC in scikits.learn. SGDClassif

Re: [Scikit-learn-general] Memory consumption of LinearSVC.fit

2011-10-07 Thread bdholt1
We wrestled with exactly this issue for decision trees, so its clear now that a general solution would be very beneficial to scikit-learn. -Original Message- From: Andreas Mueller Date: Fri, 07 Oct 2011 10:42:17 To: Reply-To: scikit-learn-general@lists.sourceforge.net Subject: Re: [Sci

Re: [Scikit-learn-general] Memory consumption of LinearSVC.fit

2011-10-07 Thread Andreas Mueller
> However I am pretty sure that it will force a copy of your data to be > double precision (64bit). As you suggested, this is the case for both LinearSVC and SGDClassifier. > If you install cython you can patch the > source code to force single precision instead. > > We might want to add support