Re: [Scikit-learn-general] Sparse Matrices and Classifiers

2012-01-20 Thread Mathieu Blondel
On Sat, Jan 21, 2012 at 2:28 AM, Gael Varoquaux wrote: > Each discussion on the scipy mailing about matrices versus arrays raises > a thread expressing incomprehension across different groups of users that > either think that matrix objects are dangerous and to be avoided, or > fundamental to exp

Re: [Scikit-learn-general] Sparse Matrices and Classifiers

2012-01-20 Thread Gael Varoquaux
On Thu, Jan 19, 2012 at 10:48:11AM -0500, Kenneth C. Arnold wrote: > As an aside to those who use scipy's sparse matrices: do you find it > troublesome that scipy's sparse things behave like matrices instead of > like ndarrays? Yes I do. > Of course this should be brought up on a main scipy list,

Re: [Scikit-learn-general] Sparse Matrices and Classifiers

2012-01-19 Thread Lars Buitinck
2012/1/19 Kenneth C. Arnold : > As an aside to those who use scipy's sparse matrices: do you find it > troublesome that scipy's sparse things behave like matrices instead of > like ndarrays? If dense matrices are a thin wrapper around dense > ndarrays, shouldn't sparse matrices be a thin wrapper ar

Re: [Scikit-learn-general] Sparse Matrices and Classifiers

2012-01-19 Thread Alexandre Passos
On Thu, Jan 19, 2012 at 10:48, Kenneth C. Arnold wrote: > On Thu, Jan 19, 2012 at 3:05 AM, Olivier Grisel > wrote: >> Rather than improving the error message when passing sparse arrays to >> the dense impl of SVC we should refactor SVC to accept both dense and >> sparse representation and use the

Re: [Scikit-learn-general] Sparse Matrices and Classifiers

2012-01-19 Thread Kenneth C. Arnold
On Thu, Jan 19, 2012 at 3:05 AM, Olivier Grisel wrote: > Rather than improving the error message when passing sparse arrays to > the dense impl of SVC we should refactor SVC to accept both dense and > sparse representation and use the right wrapper as already done for > SGD, LinearSVC, LogisticReg

Re: [Scikit-learn-general] Sparse Matrices and Classifiers

2012-01-19 Thread Lars Buitinck
2012/1/19 Andreas : > I'll gladly review your pull request ;) +1 :) -- Lars Buitinck Scientific programmer, ILPS University of Amsterdam -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive onl

Re: [Scikit-learn-general] Sparse Matrices and Classifiers

2012-01-19 Thread Andreas
On 01/19/2012 09:05 AM, Olivier Grisel wrote: > 2012/1/19 Gael Varoquaux: > >> On Thu, Jan 19, 2012 at 12:13:38PM +0900, Mathieu Blondel wrote: >> >>> Since your data is sparse, you need to use svm.sparse.SVC, not svm.SVC. >>> >> Those error messages are really not enlightning. Ma

Re: [Scikit-learn-general] Sparse Matrices and Classifiers

2012-01-19 Thread Olivier Grisel
2012/1/19 Gael Varoquaux : > On Thu, Jan 19, 2012 at 12:13:38PM +0900, Mathieu Blondel wrote: >> Since your data is sparse, you need to use svm.sparse.SVC, not svm.SVC. > > Those error messages are really not enlightning. Mathieu, you were saying > in the thread about GSOC that sparse functionality

Re: [Scikit-learn-general] Sparse Matrices and Classifiers

2012-01-18 Thread Gael Varoquaux
On Thu, Jan 19, 2012 at 12:13:38PM +0900, Mathieu Blondel wrote: > Since your data is sparse, you need to use svm.sparse.SVC, not svm.SVC. Those error messages are really not enlightning. Mathieu, you were saying in the thread about GSOC that sparse functionality in the scikit could use some love.

Re: [Scikit-learn-general] Sparse Matrices and Classifiers

2012-01-18 Thread Mathieu Blondel
On Thu, Jan 19, 2012 at 9:57 AM, Manish Katyal wrote: > Just getting started with scikits and was running into a problem: > > My large dataset is in SVMLight format. I load it like (X_train, y_train = > load_svmlight_file(f)) > When I try using the SVM > Classifier: svm.SVC(gamma=0.001).fit(X_trai

Re: [Scikit-learn-general] Sparse Matrices and Classifiers

2012-01-18 Thread Robert Layton
On 19 January 2012 11:57, Manish Katyal wrote: > Just getting started with scikits and was running into a problem: > > My large dataset is in SVMLight format. I load it like (X_train, y_train = > load_svmlight_file(f)) > When I try using the SVM > Classifier: svm.SVC(gamma=0.001).fit(X_train,y_tr

[Scikit-learn-general] Sparse Matrices and Classifiers

2012-01-18 Thread Manish Katyal
Just getting started with scikits and was running into a problem: My large dataset is in SVMLight format. I load it like (X_train, y_train = load_svmlight_file(f)) When I try using the SVM Classifier: svm.SVC(gamma=0.001).fit(X_train,y_train), I get the following error: "File "/var/tmp/scilearn/l