ENH Add 'axis' argument to sparsefuncs.mean_variance_axis

This PR adds an 'axis' argument to sparsefuncs.mean_variance_axis, making it easier to calculate the columnwise mean/variance of sparse matrices. 

While switching the codebase over to the new functionality, I noticed that  `VarianceThreshold` needlessly converted CSC matrices to CSR. This PR also includes a commit to fix this, as the change fits naturally with the other changes.

(If the immediate need for the new functionality is not obvious: This PR is the first in a series that tries to split up #2514 into a few smaller, easy-to-digest PRs. I plan to commit other PRs that will make use of this one)
Perhaps more to the point, unlike scipy.sparse, utils here are not public.


On 3 September 2014 04:21, Lars Buitinck <notifications@github.com> wrote:

>  In sklearn/utils/sparsefuncs.py:
>
> > @@ -61,6 +61,9 @@ def mean_variance_axis0(X):
> >      X: CSR or CSC sparse matrix, shape (n_samples, n_features)
> >          Input data.
> >
> > +    axis: int (either 0 or 1)
> > +        Axis along which the axis should be computed.
>
> Yes, I'd get rid of those. They're unlikely to be more useful than
> confusing.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/scikit-learn/scikit-learn/pull/3622/files#r17004979>.
>