norm.vector: Min-Max Feature scaling normalization

Description Usage Arguments Details Value Author(s) Examples

View source: R/norm.vector.R

Description

Normalizes a vector using the Min-Max Feature scaling method (a.k.a unity-based normalization)

Usage

1
norm.vector(x, a.b = NULL)

Arguments

x

A vector

a.b

A vector that indicates the minimum and maximum scaling values

Details

Feature scaling is used to bring all values into the range [0,1]. This is also called unity-based normalization. When 'a.b = NULL' (default), the highest and lowest values in 'x' will turn to 1 and 0, respectively, while all values in between will be re-scaled. Defining 'a.b' will bring all values into the range [a,b].

Value

A normalized vector

Author(s)

Alejandro Linares

Examples

1
2
3
4
5
6
7
8
9
x <- seq(from = 1, to = 100, by = 0.1)
y <- sin(sqrt(x))
plot(y~x, type = "l")

y.n <- norm.vector(y)
plot(y.n~x, type = "l")

y.ab <- norm.vector(y, a.b = c(5,20))
plot(y.ab~x, type = "l")

FCSlib documentation built on Nov. 27, 2020, 5:09 p.m.

Related to norm.vector in FCSlib...