Sitemap
Data PR

Data PR

Member-only story

Data Normalization and Standardization in R

16 min readNov 27, 2024

Hello Folks,

Press enter or click to view image in full size

Data preprocessing is a vital step in any data analysis or machine learning project, and two fundamental techniques used during preprocessing are normalization and standardization. These techniques help bring data into a comparable scale, improve model performance, and ensure faster convergence in machine learning algorithms.

In this blog, we’ll explore the concepts of normalization and standardization, why they are important, and how to implement them using R.

1. What is Data Normalization?

Normalization rescales the values of numerical features to a fixed range, usually between 0 and 1. It is particularly useful when the dataset contains attributes of different scales, as it ensures that no variable dominates the model due to its scale.

Formula for Normalization:

x′=x−min(x)max(x)−min(x)x’ = \frac{x — \text{min}(x)}{\text{max}(x) — \text{min}(x)}x′=max(x)−min(x)x−min(x)​

Code Example: Normalization in R

r

--

--