2014-06-05 13:44 GMT+02:00 ZORAIDA HIDALGO SANCHEZ <zora...@tid.es>: > Why SelectKBest returns a csr_matrix and is that efficient?
Because it's efficient (compact storage, fast row-wise operations such as matrix multiplication with CSR on the left), because it's easy to generate, and because CSR->CSC conversion is very cheap. Hope that answers both questions at once :) > How I concatenate(or vstack) the output of ContVectorizer with my > matrix(which is a numpy array of shame(n_instances, n_extraattributes)? With scipy.sparse.hstack (not vstack). ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general