quick.norm {akmeans}R Documentation

normalization function

Description

it is normalizing each row to have L2 norm as 1 or sum as 1

Usage

quick.norm(A, mod = 2)

Arguments

A

Input matrix, n by p

mod

1: make each row has L2 norm as 1 2: make each row has sum as 1

Value

A normalized n by p matrix will be returned

Author(s)

Jungsuk Kwac

Examples

quick.norm(matrix(rnorm(9),3,3))
quick.norm(matrix(rnorm(9),3,3),mod=1)

[Package akmeans version 1.1 Index]