[Scikit-learn-general] Two problems with SGDClassifier.predict_proba()

2012-09-12 Thread Christian Jauvin
(1) When I try to use it with a sparse matrix I get (for a binary problem): -- 585 proba = np.ones((len(X), 2), dtype=np.float64) -- 175 raise TypeError(sparse matrix length is ambiguous; use getnnz() 176 or shape[0]) (2) When I try to use it for a

Re: [Scikit-learn-general] Two problems with SGDClassifier.predict_proba()

2012-09-12 Thread Olivier Grisel
2012/9/12 Christian Jauvin cjau...@gmail.com: (1) When I try to use it with a sparse matrix I get (for a binary problem): -- 585 proba = np.ones((len(X), 2), dtype=np.float64) -- 175 raise TypeError(sparse matrix length is ambiguous; use getnnz() 176

Re: [Scikit-learn-general] Two problems with SGDClassifier.predict_proba()

2012-09-12 Thread Peter Prettenhofer
2012/9/12 Olivier Grisel olivier.gri...@ensta.org: 2012/9/12 Christian Jauvin cjau...@gmail.com: (1) When I try to use it with a sparse matrix I get (for a binary problem): -- 585 proba = np.ones((len(X), 2), dtype=np.float64) -- 175 raise TypeError(sparse matrix length is

Re: [Scikit-learn-general] Two problems with SGDClassifier.predict_proba()

2012-09-12 Thread Peter Prettenhofer
Christian, I've pushed a Pull Request that fixes the issue: https://github.com/scikit-learn/scikit-learn/pull/1141/ sorry for the inconveniences caused. best, Peter 2012/9/12 Peter Prettenhofer peter.prettenho...@gmail.com: 2012/9/12 Olivier Grisel olivier.gri...@ensta.org: 2012/9/12