Performs the negative maximum normalization on a non-negative numeric vector. The resulting vector is both reversed and normalized.

neg_max_normalization(x = numeric(0))

Arguments

x

Non-negative numeric vector.

Value

Normalized numeric vector.

Details

For negative maximum normalization of a vector, difference between the maximum and minimal value of the vector is added tothe inverse value of every element and the result is divided with the original maximum value. Used formula: `(max(x)-min(x)-x)/max(x)`.

If the negative maximum normalization is applied twice to a non-negative vector, obtained result is the same as if the maximum normalization was applied once.

Examples

{ neg_max_normalization(c(1,2,3,4)) neg_max_normalization(neg_max_normalization(c(1,2,3,4))) }
#> [1] 0.25 0.50 0.75 1.00