Search
 
SCRIPT & CODE EXAMPLE
 

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]])
Comment

data normalization python

from sklearn import preprocessing
normalizer = preprocessing.Normalizer().fit(X_train)  
X_train = normalizer.transform(X_train)
X_test = normalizer.transform(X_test)
Comment

what is data normalization

Method to normalize data so that data redundency is reduced
Comment

PREVIOUS NEXT
Code Example
Python :: delay print in python 
Python :: how to remove none in python 
Python :: pygame point at mouse 
Python :: pandas count nans in column 
Python :: get name of month python 
Python :: count most frequent words in list python 
Python :: how to fix valueerror in python 
Python :: pygityb 
Python :: check if file is txt python 
Python :: django deployment 
Python :: filter in pandas 
Python :: python dictionary delete by value 
Python :: python global variable across files 
Python :: random python between 0 and 1 
Python :: how to restart loop python 
Python :: joins in pandas 
Python :: replace matrix values python 
Python :: python message from teams 
Python :: find max value in list python 
Python :: pandas remove time from date 
Python :: BeautifulSoup(raw_html 
Python :: get request body flask 
Python :: os.execl 
Python :: how to write a code for anagram in python 
Python :: python thread with return values? 
Python :: drop-trailing-zeros-from-decimal python 
Python :: subset a list python 
Python :: tweepy auth 
Python :: python if string contains substring 
Python :: python copy a dictionary to a new variable 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =