| phi | R Documentation |
This function performs feature-wise min-max normalization on a matrix or data frame.
Each column is rescaled to the range [0,1] using its minimum and maximum values.
The minimum and maximum values are stored as attributes for later inverse transformation.
phi(u)
u |
A numeric matrix or data frame. Each column will be normalized independently. |
A numeric matrix of the same dimensions as u, with all values rescaled to [0,1].
The returned matrix has two attributes:
"min_X": A matrix containing the column-wise minima.
"max_X": A matrix containing the column-wise maxima.
# Example matrix
X <- matrix(c(1, 2, 3, 4, 5, 6), ncol = 2)
X_norm <- phi(X)
X_norm
attributes(X_norm)$min_X
attributes(X_norm)$max_X
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.