W3cubDocs

/scikit-learn

sklearn.utils.sparsefuncs.mean_variance_axis

sklearn.utils.sparsefuncs.mean_variance_axis(X, axis) [source]

Compute mean and variance along an axix on a CSR or CSC matrix

Parameters:

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.

Returns:

means : float array with shape (n_features,)

Feature-wise means

variances : float array with shape (n_features,)

Feature-wise variances

© 2007–2017 The scikit-learn developers
Licensed under the 3-clause BSD License.
http://scikit-learn.org/stable/modules/generated/sklearn.utils.sparsefuncs.mean_variance_axis.html