On Sun, Nov 6, 2011 at 1:26 AM, Lars Buitinck <[email protected]> wrote:
> 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?

Indeed, there are a bunch of resize in the sparse bindings that
shouldn't be there, I've opened an issue:

https://github.com/scikit-learn/scikit-learn/issues/426

Fabian.

>
> --
> 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
>

------------------------------------------------------------------------------
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

Reply via email to