| apply_minmax | R Documentation |
Scales df[, scaler$cols] using the precomputed min/range.
Returns a numeric matrix with the same column order as scaler$cols.
apply_minmax(df, scaler)
df |
A data frame or tibble. |
scaler |
A scaler object returned by |
A numeric matrix scaled to approximately [0, 1] per column.
Columns correspond to scaler$cols.
df_train <- data.frame(sand = c(20, 40, 60), clay = c(30, 20, 10))
sc <- fit_minmax(df_train, c("sand", "clay"))
df_new <- data.frame(sand = c(50, 25), clay = c(15, 28))
apply_minmax(df_new, sc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.