2011/11/6 Mathieu Blondel <[email protected]>: >> 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. > > We really need to do something about this issue, as it keeps popping > up. A few ideas: > > 1) make indices=True the default in cv objects > > 2) in check_cv, raise an exception if cv.indices=False and hasattr(X, "tocsr") > > 3) in check_cv, return a clone of the cv object with `indices` > enforced to True if hasattr(X, "tocsr")
I think we already for 1) in the past. Let me implement both 1) and 2). 3) sounds too magical to me. -- Olivier http://twitter.com/ogrisel - http://github.com/ogrisel ------------------------------------------------------------------------------ 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
