Normalization

Normalization is done using the minmax concept to bring the various attributes on the same scale. It is calculated by the formula given here:

normalized = (x-min(x))/(max(x)-min(x))

So if we want to normalize the volume variable, we can do it by executing the following code:

> normalized = (Sampledata$Volume-+min(Sampledata$Volume))/(max(Sampledata$Volume)-+min(Sampledata$Volume)) 
> normalized 

Get Learning Quantitative Finance with R 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.