View source: R/datamanagement.R
normalize_data | R Documentation |
Scales the response and covariates of a dataset to the unit interval [0,1]
.
This normalization is required before applying SLGP methods. If range bounds are
not provided, they are computed from the data.
normalize_data(
data,
predictorNames,
responseName,
predictorsUpper = NULL,
predictorsLower = NULL,
responseRange = NULL
)
data |
A data frame containing the dataset. |
predictorNames |
A character vector of covariate column names. |
responseName |
A character string specifying the response variable name. |
predictorsUpper |
Optional numeric vector of upper bounds for covariates. |
predictorsLower |
Optional numeric vector of lower bounds for covariates. |
responseRange |
Optional numeric vector of length 2 giving lower and upper bounds for the response. |
A normalized data frame with the same column structure as data
, with values scaled to [0,1]
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.