0% found this document useful (0 votes)
25 views2 pages

Normalization vs Standardization Explained

Uploaded by

nishu.government
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

Normalization vs Standardization Explained

Uploaded by

nishu.government
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

5/22/22, 12:26 AM Normalization vs Standardization - GeeksforGeeks

Normalization vs Standardization
Difficulty Level : Basic Last Updated : 12 Nov, 2021

Feature scaling is one of the most important data preprocessing step in machine learning. Algorithms
that compute the distance between the features are biased towards numerically larger values if the
data is not scaled.

Tree-based algorithms are fairly insensitive to the scale of the features. Also, feature scaling helps
machine learning, and deep learning algorithms train and converge faster.

There are some feature scaling techniques such as Normalization and Standardization that are the
most popular and at the same time, the most confusing ones.

Let’s resolve that confusion.

Normalization or Min-Max Scaling is used to transform features to be on a similar scale. The new
point is calculated as:

X_new = (X - X_min)/(X_max - X_min)

This scales the range to [0, 1] or sometimes [-1, 1]. Geometrically speaking, transformation squishes
the n-dimensional data into an n-dimensional unit hypercube. Normalization is useful when there are
no outliers as it cannot cope up with them. Usually, we would scale age and not incomes because only
a few people have high incomes but the age is close to uniform.

Standardization or Z-Score Normalization is the transformation of features by subtracting from


mean and dividing by standard deviation. This is often called as Z-score.

X_new = (X - mean)/Std

Standardization can be helpful in cases where the data follows a Gaussian distribution. However, this
does not have to be necessarily true. Geometrically speaking, it translates the data to the mean vector
of original data to the origin and squishes or expands the points if std is 1 respectively. We can see
that we are just changing mean and standard deviation to a standard normal distribution which is still
normal thus the shape of the distribution is not affected.

[Link] 1/2
5/22/22, 12:26 AM Normalization vs Standardization - GeeksforGeeks

Standardization does not get affected by outliers because there is no predefined range of transformed
features.

Difference between Normalization and Standardization

[Link]. Normalization Standardization

1. Minimum and maximum value of features Mean and standard deviation is used for
are used for scaling scaling.

2. It is used when features are of different It is used when we want to ensure zero mean
scales. and unit standard deviation.

3. Scales values between [0, 1] or [-1, 1]. It is not bounded to a certain range.

4. It is really affected by outliers. It is much less affected by outliers.

5. Scikit-Learn provides a transformer Scikit-Learn provides a transformer


called MinMaxScaler for Normalization. called StandardScaler for standardization.

6. This transformation squishes the n- It translates the data to the mean vector of
dimensional data into an n-dimensional unit original data to the origin and squishes or
hypercube. expands.

7. It is useful when we don’t know about the It is useful when the feature distribution is
distribution Normal or Gaussian.

8. It is a often called as Scaling Normalization It is a often called as Z-Score Normalization.

[Link] 2/2

Common questions

Powered by AI

Normalization, by transforming feature values into a specified range such as [0, 1], effectively compresses the n-dimensional data space into an n-dimensional unit hypercube, which ensures each feature is relative to each other within that bounded space . This transformation means that the magnitude of feature differences is reduced, making the data more uniform and suitable for algorithms sensitive to feature scales. Such uniformity optimizes the learning process, ensuring that no feature disproportionately influences model training, particularly in gradient-based methods .

Normalization is preferable when the feature data does not include outliers and needs to be constrained within a specific range for specific algorithms sensitive to the scale of features . It is particularly useful when features are of different scales, ensuring that they are transformed consistently . For example, scaling features such as age rather than income would benefit from normalization because of the consistent and uniform distribution of ages as opposed to the disparity in income ranges .

Considering data distribution is crucial when choosing between normalization and standardization because each scaling technique handles data differently based on distribution characteristics. Normalization suits uniform distributions where features need to fit a bounded range, but struggles with data containing outliers . Standardization, aligned with Gaussian characteristics, standardizes differences effectively and manages outliers without range constraints . Thus, understanding the data distribution helps determine the appropriate scaling method to maintain data integrity and ensure algorithmic efficiency .

Scikit-Learn's MinMaxScaler performs normalization by rescaling the dataset such that all feature values fall within the range [0, 1] or [-1, 1], ensuring that feature scales are consistent . Meanwhile, StandardScaler conducts standardization by transforming data to have a zero mean and unit standard deviation . They differ in that MinMaxScaler requires range constraints and is sensitive to outliers, whereas StandardScaler ensures data normalization in the form of Z-scores, maintaining utility where outliers are present .

Tree-based algorithms, such as decision trees and random forests, generally do not require feature scaling because they are insensitive to the scale of features . These algorithms split nodes based on the feature value comparisons but not their specific magnitudes. Therefore, not normalizing or standardizing the features doesn't affect their performance significantly, as their decision-making process is not inherently dependent on distance or variance among feature values .

Scaling with normalization constrains feature values within a limited range, often leading to clearer feature distributions and comparisons in data visualizations . When visualizing normalized data, the uniformity in feature scales allows for more intuitive exploration and analysis, particularly when interacting features are displayed over the same scale, reducing visual distortion that could arise from disproportionate ranges . This clear visualization can guide more effective feature analysis and model diagnostic processes, especially when assessing model performance based on feature interactions .

Normalization would be inappropriate in a scenario such as scaling incomes in a dataset where outliers exist, like a few individuals having significantly higher incomes compared to the rest. This is because normalization would unnecessarily compress the range of all other income data into [0, 1], distorting the scale due to these outliers . In such cases, standardization would be preferable because it is less influenced by extreme values and allows the incorporation of outliers without distorting the overall data distribution .

Normalization and standardization assist machine learning algorithms by ensuring that all features contribute equally, preventing any singularly large ranges from dominating the learning process . Algorithms that rely on distance evaluation between data points, such as K-nearest neighbors or support vector machines, perform more accurately when the data is scaled such that each feature has a consistent range or standardized distribution . This scaling process also expedites algorithm training and convergence, creating a more efficient model development process .

Standardization affects data by centering it around the mean with zero mean and unit standard deviation. This method is less affected by outliers since it does not operate within a pre-defined range, thus preserving the integrity of data with varying scales . It's preferred for Gaussian-distributed data because it maintains the distribution's shape while providing standardized scores (Z-scores) which help in comparing different data points effectively on a common scale .

Normalization transforms features to be within a range such as [0, 1] or [-1, 1] using the formula X_new = (X - X_min)/(X_max - X_min), and it is highly affected by outliers . In contrast, standardization transforms features by centering them around the mean with a standard deviation of one using the formula X_new = (X - mean)/Std, and it is less sensitive to outliers since it does not have a bounded range . Moreover, normalization often squishes n-dimensional data into an n-dimensional unit hypercube, whereas standardization translates data to the origin and resizes it without altering the distribution shape significantly .

You might also like