Problems on min-max normalization
Last Updated :
16 Jul, 2021
Overview :
The measurement unit used can affect the data analysis. For instance, changing the measurement unit from kg to pounds. Expressing an attribute in smaller units will lead to a larger range for that attribute and thus give inefficient results. To avoid the dependence on the choice of measurement units, the data should be normalized. Normalization is used for scaling the data of attributes so that it falls in a smaller range, such as -2.0 to 2.0. It is usually used in classification algorithms.
Use of normalization :
Normalization is required when we deal with attributes having a different scale, and it may lead to less effectiveness of an important attribute(having a lower scale) because of other attributes having values on a larger scale. It also decreases the training time needed for the machine to learn the data. Thus, the efficiency of the machine learning model increases after the dataset is normalized.
Min-Max Normalization :
In this technique of knowledge normalization, a linear transformation is performed on the first data. Minimum and maximum value from data is fetched and each value is replaced according to the following formula. Min-Max Normalization preserves the relationships among the original data values. It will encounter an out-of-bounds error if a future input case for normalization falls outside the first data range for A. The formula is given below-

Where A is the attribute data represent as follows.
Min(A) - It is the minimum absolute value A.
Max(A) - It is maximum absolute value of A.
vâ - It is the new value of each attribute data.
v - It is the old value of each attribute data.
new_max(A), new_min(A) is the max and min value within the range
(i.e boundary value of range required) respectively.
Min-Max Normalization maps a value v of A to v' in the range
[new_min(A),new_max(A)] by computing.
Example :
Here, we will discuss an example as follows.
Normalize the following group of data –
1000,2000,3000,9000
using min-max normalization by setting min:0 and max:1
Solution –
here,new_max(A)=1 , as given in question- max=1
new_min(A)=0,as given in question- min=0
max(A)=9000,as the maximum data among 1000,2000,3000,9000 is 9000
min(A)=1000,as the minimum data among 1000,2000,3000,9000 is 1000
Case-1: normalizing 1000 –
v = 1000 , putting all values in the formula,we get
v' = (1000-1000) X (1-0)
----------------- + 0 =0
9000-1000Case-2: normalizing 2000 –
v = 2000, putting all values in the formula,we get
v '= (2000-1000) X (1-0)
----------------- + 0 =0 .125
9000-1000Case-3: normalizing 3000 –
v=3000, putting all values in the formula,we get
v'=(3000-1000) X (1-0)
----------------- + 0 =0 .25
9000-1000
Case-4: normalizing 9000 –
v=9000, putting all values in the formula, we get
v'=(9000-1000) X (1-0)
----------------- + 0 =1
9000-1000
Outcome :
Hence, the normalized values of 1000,2000,3000,9000 are 0, 0.125, .25, 1.
Similar Reads
Data Normalization in Data Mining
Data normalization is a technique used in data mining to transform the values of a dataset into a common scale. This is important because many machine learning algorithms are sensitive to the scale of the input features and can produce better results when the data is normalized. Normalization is use
5 min read
Uni-variate Optimization - Data Science
Optimization is an important part of any data science project, with the help of optimization we try to find the best parameters for our machine learning model which will give the minimum loss value. There can be several ways of minimizing the loss function, However, generally, we use variations of t
6 min read
Minimize cost to convert given two integers to zero using given operations
Given two integers X and Y, and two values cost1 and cost2, the task is to convert the given two numbers equal to zero at minimal cost by performing the following two types of operations: Increase or decrease any one of them by 1 at cost1.Increase or decrease both of them by 1 at cost2. Examples: In
6 min read
Best meeting point in 2D binary array
You are given a 2D grid of values 0 or 1, where each 1 marks the home of someone in a group. And the group of two or more people wants to meet and minimize the total travel distance. They can meet anywhere means that there might be a home or not. The distance is calculated using Manhattan Distance,
8 min read
Split the Array in two parts such that maximum product is minimized
Given an array of integers, arr[] of size N (<=16), the task is to partition the array into 2 parts such that the maximum product of the 2 halves is minimized. Find the minimized maximum product of the half. If the array is empty, print -1. Examples: Input: arr[] = {3, 5, 7}Output: 15Explanation:
7 min read
Maximize the value of expression [i.j - K.(Ai | Aj)] over all pairs (i, j) in given Array
Given an array A[] of length N and an integer K, the task is to maximize the value of expression [i.j - K.(Ai | Aj)] over all pairs (i, j) in given Array, where (1 ⤠i < j ⤠N) and | denotes Bitwise OR operator. Examples: Input: A[] = {5, 20, 1, 0, 8, 11}, K = 10Output: 2Explanation: The maximum
6 min read
Java Math min() method with Examples
The Java.lang.math.min() function is an inbuilt function in java that returns the minimum of two numbers. The arguments are taken in int, double, float and long. If a negative and a positive number is passed as an argument then the negative result is generated. And if both parameters passed are nega
2 min read
Find minimum cost to buy all books
Given an array of ratings for n books. Find the minimum cost to buy all books with below conditions : Cost of every book would be at-least 1 dollar.A book has higher cost than an adjacent (left or right) if rating is more than the adjacent. Examples : Input : Ratings[] = {1, 3, 4, 3, 7, 1} Output :
6 min read
Minimum and maximum count of elements at D distance from arr[i] in either direction
Given a sorted array arr[] and a positive integer D, the task is to find the minimum and the maximum number of array elements that lie over the distance of D from an array element arr[i] in either direction i.e., over the range [arr[i] - D, arr[i]] or [arr[i], arr[i] + D]. Examples: Input arr[] = {2
14 min read
Maximum distance between i and j such that i ⤠j and A[i] ⤠B[j]
Given two non-increasing arrays A[] and B[] of size N, the task is to find the maximum distance between i and j such that i ⤠j and A[i] ⤠B[j]. Examples: Input: A[] = {2, 2, 2}, B[] = {10, 10, 1}Output: 1Explanation: The valid pairs satisfying the conditions are (0, 0), (0, 1), and (1, 1).Therefore
11 min read