On my box, RidgeClassifier finishes in 136 seconds but kNN dies with
MemoryError.

Could you try to identify which commit introduced the regression with git
bisect?

Mathieu

    pred = clf.predict(X_test)
  File
"/Users/mathieublondel/Desktop/projects/scikit-learn/sklearn/neighbors/classification.py",
line 131, in predict
    neigh_dist, neigh_ind = self.kneighbors(X)
  File
"/Users/mathieublondel/Desktop/projects/scikit-learn/sklearn/neighbors/base.py",
line 219, in kneighbors
    squared=True)
  File
"/Users/mathieublondel/Desktop/projects/scikit-learn/sklearn/metrics/pairwise.py",
line 487, in pairwise_distances
    return func(X, Y, **kwds)
  File
"/Users/mathieublondel/Desktop/projects/scikit-learn/sklearn/metrics/pairwise.py",
line 174, in euclidean_distances
    distances = safe_sparse_dot(X, Y.T, dense_output=True)
  File
"/Users/mathieublondel/Desktop/projects/scikit-learn/sklearn/utils/extmath.py",
line 76, in safe_sparse_dot
    ret = ret.toarray()
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/compressed.py",
line 550, in toarray
    return self.tocoo(copy=False).toarray()
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/coo.py",
line 238, in toarray
    B = np.zeros(self.shape, dtype=self.dtype)
MemoryError

On Fri, Sep 7, 2012 at 10:51 PM, Lars Buitinck <[email protected]> wrote:

> I just tried running the document classification example with all 20
> classes, but the RidgeClassifier was taking so much memory that it
> triggered the OOM killer. This didn't happen before, so it much be a
> recent change to the codebase. Does anyone know what may be causing
> this?
>
> --
> Lars Buitinck
> Scientific programmer, ILPS
> University of Amsterdam
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to