IPF_alg: Iterative proportional fitting algorithm

Description Usage Arguments Value Examples

View source: R/normalization.R

Description

Iterative proportional fitting (IPF) is used to normalize a sparse matrix.

Usage

1
IPF_alg(symLFM, numberOfIterations)

Arguments

symLFM

A symmetric sparse ligation frequency matrix (LFM) with binned or unbinned data.

numberOfIterations

The number of iterations for normalization. Usually, 10 should be more than enough.

Value

A list containing the normalized, symmetric matrix normLFM, the dataframes with the row sums rowBiases and the column sums colBiases of every iteration, and a vector with the loss function lf for every iteration lossFunction.

Examples

1
2
3
M <- matrix(c(3,0,1,0,7,9,1,9,7),3,3)
M <- Matrix::Matrix(M, sparse = TRUE)
ipf <- chromium:::IPF_alg(M,10)

AnnikaGable/chromium documentation built on July 12, 2018, 4 p.m.