2013/10/18 Stephane Clinchant <stephane.clinch...@gmail.com>:
> NMF code in 0.13 and before behaves differently compared to 0.14.
> An example:
>
> import numpy
> import pickle
>
> X=pickle.load(open("data.pkl"))
>
> import sklearn
> from sklearn import decomposition
> print sklearn.__version__
> nmf=decomposition.NMF(n_components=20)
> nmf.fit(X)
>
> This runs fine with sklearn <=0.13 with a sparse matrix (~= 40Mo) and
> consume little memory (I check with memory_profiler)
> But with 0.14 (using a different code), this produce:
> python test_NMF_fit.py
> 0.14.1
> Traceback (most recent call last):
>   File "test_NMF_fit.py", line 11, in <module>
>     nmf.fit(X)
>   File
> "/home/sclincha/anaconda/lib/python2.7/site-packages/sklearn/decomposition/nmf.py",
> line 556, in fit
>     self.fit_transform(X, **params)
>   File
> "/home/sclincha/anaconda/lib/python2.7/site-packages/sklearn/decomposition/nmf.py",
> line 531, in fit_transform
>     normWHT = np.trace(np.dot(np.dot(H.T, np.dot(W.T, W)), H))
> MemoryError
>
> Do you have any explanations/motivations for changing the implementations of
> NMF ?
> Is there some special cases where one should use 0.14 vs 0.13 ?

This is obviously a performance regression. Can you check on master if
the problem is still there? If yes, please open an issue and detail
the size (shape) of your input data and ideally a reproduction script
that reproduces the problem on randomly generated data for instance.

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to