View source: R/utils-globals.R
| min_max_scale | R Documentation |
Scales numeric vectors to the [0, 1] range using the formula:
(x - \min(x)) / (\max(x) - \min(x))
min_max_scale(x)
x |
Numeric vector. Continuous variable(s) to scale. |
This is the recommended preprocessing step for continuous variables prior to VAE training with AutoTab, ensuring all inputs are on comparable scales to binary and categorical features.
The transformation is performed column-wise when applied to data frames.
Numeric vector of the same length as x, scaled to [0, 1].
extracting_distribution(), set_feat_dist(), VAE_train()
x <- c(10, 20, 30)
min_max_scale(x)
# Apply to multiple columns
data <- data.frame(age = c(20, 40, 60), income = c(3000, 5000, 7000))
Continuous_MinMaxScaled = as.data.frame(lapply(data, min_max_scale))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.