Normalizing and standardizing the features
We normalize (or standardize) data for computational efficiency and so we do not exceed the computer's limits. It is also advised to do so if we want to explore relationships between variables in a model.
Tip
Computers have limits: there is an upper bound to how big an integer value can be (although, on 64-bit machines, this is, for now, no longer an issue) and how good a precision can be for floating-point values.
Normalization transforms all the observations so that all their values fall between 0
and 1
(inclusive). Standardization shifts the distribution so that the mean of the resultant values is 0
and standard deviation equals 1
.
Getting ready
To execute this recipe, you will need the pandas
module. ...
Get Practical Data Analysis Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.