This is documentation for an old release of Scikit-learn (version 0.23). Try the latest stable release (version 1.6) or development (unstable) versions.
sklearn.utils.sparsefuncs
.inplace_column_scale¶
-
sklearn.utils.sparsefuncs.
inplace_column_scale
(X, scale)[source]¶ Inplace column scaling of a CSC/CSR matrix.
Scale each feature of the data matrix by multiplying with specific scale provided by the caller assuming a (n_samples, n_features) shape.
- Parameters
- XCSC or CSR matrix with shape (n_samples, n_features)
Matrix to normalize using the variance of the features.
- scalefloat array with shape (n_features,)
Array of precomputed feature-wise values to use for scaling.