- Learning Quantitative Finance with R
- Dr. Param Jeet Prashant Vats
- 52字
- 2021-07-09 19:06:54
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