2011/11/6 Sami Liedes <[email protected]>: > On Sun, Nov 06, 2011 at 12:22:37AM +0100, Lars Buitinck wrote: >> With sparse data, you should use the indices=True argument to >> StratifiedKFold. By default, it will return a boolean mask, which >> cannot be used to index into a sparse matrix. > > Ah, didn't know of that option. Thanks. (Why does indexing into a > sparse matrix with a boolean mask not fail with an error message but > rather silently returns the entire matrix?)
You'll have to ask the SciPy maintainers. > Unfortunately this still doesn't resolve the problem with sparse.SVC > and GridSearchCV(njobs=10); I still get the same error message: > > ------------------------------------------------------------ > File "libsvm.pyx", line 157, in > sklearn.svm.sparse.libsvm.libsvm_sparse_train > (sklearn/svm/sparse/libsvm.c:1924) > ValueError: cannot resize this array: it does not own its data > ------------------------------------------------------------ I can't reproduce this, but it seems like a bug in the sparse SVM wrapper code. Maybe fabianp can have a look at this? -- Lars Buitinck Scientific programmer, ILPS University of Amsterdam ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
