Description Usage Arguments Details Value Author(s) References See Also Examples
Function for normalizing the range of values of a continuous variable into a new interval using a linear scaling.
1 |
x |
A vector with numeric values |
t.mn |
The minimum value in the new scale |
t.mx |
The maximum value in the new scale |
d.mn |
The minimum value of the continuous variable being normalized
(defaults to the minimum of the values in |
d.mx |
The maximum value of the continuous variable being normalized
(defaults to the maximum of the values in |
The re-scaling consist in transforming the value x into
sc*x + t.mn - sc*d.mn
where sc = (t.mx-t.mn)/(d.mx-d.mn)
An object with the same dimensions as x
but with the values normalized
Luis Torgo ltorgo@dcc.fc.up.pt
Torgo, L. (2010) Data Mining using R: learning with case studies, CRC Press (ISBN: 9781439810187).
http://www.dcc.fc.up.pt/~ltorgo/DataMiningWithR
1 2 3 | ## A simple example with the algae data set
summary(LinearScaling(algae[,'NO3']))
summary(ReScaling(LinearScaling(algae[,'NO3']),-10,10))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.