File: ircNorm.Rd

package info (click to toggle)
r-cran-blockmodeling 1.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 912 kB
  • sloc: ansic: 2,024; f90: 952; sh: 13; makefile: 5
file content (38 lines) | stat: -rw-r--r-- 1,276 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ircNorm.R
\name{ircNorm}
\alias{ircNorm}
\title{Function for iterated row and column normalization of valued matrices}
\usage{
ircNorm(M, eps = 10^-12, maxiter = 1000)
}
\arguments{
\item{M}{A non-negative valued matrix to be normalized.}

\item{eps}{The maximum allows squared deviation of a row or column's maximum from 1 (if not exactly 0).
Also, if the all deviations in two consequtive iterations are smaller, the process is terminated.}

\item{maxiter}{Maximum number of iterations. If reached, the process is terminated and the current solution returned.}
}
\value{
Normalized matrix.
}
\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.
}
\examples{
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 approximately 1.
apply(A.norm, 1, sum)
apply(A.norm, 2, sum)

}
\author{
\enc{Aleš Žiberna}{Ales Ziberna}
}
\keyword{manip}