ReScaling(x, t.mn, t.mx, d.mn = min(x,na.rm=T), d.mx = max(x,na.rm=T))
x
).x
).x
but with the values normalized
sc*x + t.mn - sc*d.mn
where sc = (t.mx-t.mn)/(d.mx-d.mn)
scale
, SoftMax
, LinearScaling
## A simple example with the algae data set
summary(LinearScaling(algae[,'NO3']))
summary(ReScaling(LinearScaling(algae[,'NO3']),-10,10))
Run the code above in your browser using DataLab