scikit-learn/scikit-learn — pull request #480 by mblondel (2011-12-19 15:25:26+00:00)
Title: Mean and variance along axis 0 for sparse matrices

This PR implements a small utility to compute the mean and variance along axis 0 for sparse matrices. This is part of the effort to add sparse matrix support to `KMeans`. The utility is useful to scale the convergence tolerance with the variance over the entire (sparse) dataset.

I hope I didn't mess up the edge cases!

CC @ogrisel