sklearn.preprocessing.normalize(X, norm='l2', axis=1, copy=True, return_norm=False) [source]
Scale input vectors individually to unit norm (vector length). Read more in the User Guide. Parameters:
X : {array-like, sparse matrix}, shape [n_samples, n_features] The data to normalize, element by element. scipy.sparse matrices should be in CSR format to avoid an un-necessary copy. norm : ?l1?, ?l2?, or ?max?, optional (?l2? by default) The norm to use to normalize each non zero sample (or e