ircNorm: Function for iterated row and column normalization of valued...

Description Usage Arguments Value Author(s) Examples

Description

The aim is to obtain a matrix with row and column sums equal to 1. This is achieved by iterating row and column normalization. This is usually not possible if any row or column has only 1 non-zero cell.

Usage

1
ircNorm(M, eps = 10^-12, maxiter = 1000)

Arguments

M

A non-negative valued matrix to be normalized

eps

The maximum allows squared deviation of a row or column maximum from 1 (if not exaclty 0). Also, if the all deviations in to consequtive iterations are smaller, the process is termianted.

maxiter

Maximum number of iterations. If reached the process is termianted and the current solution returned

Value

Normalized matrix.

Author(s)

Aleš Žiberna

Examples

1
2
3
4
5
6
7
8
A<-matrix(runif(100),ncol=10)
A #A non-normalized matrix with different row and column sums.
apply(A,1,sum)
apply(A,2,sum)
A.norm<-ircNorm(A)
A.norm #Normalized matrix with all row and column sums aproximately 1.
apply(A.norm,1,sum)
apply(A.norm,2,sum)

blockmodelingOld documentation built on May 2, 2019, 5:11 p.m.