Denormalize a matrix from \([0,1]\) back to its original scale
Source:R/nmfkc.R
nmfkc.denormalize.Rdnmfkc.denormalize rescales a matrix with values in \([0,1]\) back to its
original scale using the column-wise minima and maxima of a reference matrix.
Examples
x <- nmfkc.normalize(iris[, -5])
x_recovered <- nmfkc.denormalize(x, iris[, -5])
apply(x_recovered - iris[, -5], 2, max)
#> Sepal.Length Sepal.Width Petal.Length Petal.Width
#> 0.000000e+00 4.440892e-16 0.000000e+00 2.220446e-16