Skip to contents

$$x/\|x\|_2$$ Classical; deliberately carries no book citation. MVSML (2022) sec. 2.6 pp.57-58 lists five normalizations and this is not one of them. A zero vector has no direction and is returned unchanged.

Usage

Unitl(x)

Arguments

x

Numeric vector.

Value

Named list with estimate, x_unit, norm, n, method.

References

Classical; no single owning source.

Examples

Unitl(c(3, 4))
#> $estimate
#> [1] 5
#> 
#> $x_unit
#> [1] 0.6 0.8
#> 
#> $norm
#> [1] 5
#> 
#> $n
#> [1] 2
#> 
#> $method
#> [1] "unit-length (L2) normalization"
#>