Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

normalize data python

from sklearn import preprocessing

data = [[ 1., -1.,  2.],
        [ 2.,  0.,  0.],
        [ 0.,  1., -1.]]
normalize(data)

# produces
array([[ 0.40824829, -0.40824829,  0.81649658],
       [ 1.        ,  0.        ,  0.        ],
       [ 0.        ,  0.70710678, -0.70710678]])
Source by scikit-learn.org #
 
PREVIOUS NEXT
Tagged: #normalize #data #python
ADD COMMENT
Topic
Name
8+1 =