View source: R/scoring_primitives.R
| normalize_01 | R Documentation |
Applies min-max normalization to a numeric vector, optionally clamping values to [0, 1].
normalize_01(x, direction = c("higher_better", "lower_better"), clamp = TRUE)
x |
Numeric vector. |
direction |
Character. |
clamp |
Logical. If |
Numeric vector normalized to 0–1.
normalize_01(c(10, 20, 30, 40, 50))
normalize_01(c(10, 20, 30), direction = "lower_better")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.