Description Usage Arguments Value See Also Examples
View source: R/generates_transformation_function.R
generates_normalization_function
returns the data normalization
function. The data normalization function is generated based on
unit_space_data
.
1 2 | generates_normalization_function(unit_space_data, unit_space_center,
unit_space_scale, is_scaled = TRUE)
|
unit_space_data |
Matrix with n rows (samples) and p columns (variables). Data to generate the unit space. All data should be continuous values and should not have missing values. |
unit_space_center |
Vector with length p. The values are subtrahends in
normalization. If missing, the mean for each
column of |
unit_space_scale |
Vector with length p. The values are divisors in
normalization. If missing and |
is_scaled |
Logical. If |
Function is returned which takes an n x p matrix as an (only)
argument and returns a normalized n x p matrix. The normalization
is conducted based on unit_space_data
.
1 2 3 4 5 6 | # 40 data for versicolor in the iris dataset
iris_versicolor <- iris[61:100, -5]
normalizes_data <- generates_normalization_function(iris_versicolor)
is.function(normalizes_data) # TRUE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.