normalization: Normalize numeric vector

View source: R/utils.R

normalizationR Documentation

Normalize numeric vector

Description

Normalize numeric vector

Usage

normalization(x, method = "max_min", na_rm = TRUE, ...)

Arguments

x

Input numeric vector.

method

Method used for normalization.

na_rm

Whether to remove NA values, and if setting TRUE, using 0 instead.

...

Parameters for other methods.

Value

Normalized numeric vector

Examples

nums <- c(runif(2), NA, -runif(2))
nums
normalization(nums, method = "max_min")
normalization(nums, method = "maximum")
normalization(nums, method = "sum")
normalization(nums, method = "softmax")
normalization(nums, method = "z_score")
normalization(nums, method = "mad")
normalization(nums, method = "unit_vector")
normalization(nums, method = "unit_vector", na_rm = FALSE)

inferCSN documentation built on April 13, 2025, 5:11 p.m.