Description Usage Arguments Value Examples
View source: R/normalization.R
A binned or unbinned ligation frequency matrix (LFM) is normalized using iterative proportional fitting (IPF).
1 | normalize_LFM_iteratively(LFM, numberOfIterations, plotLoss = FALSE)
|
LFM |
A sparse ligation frequency matrix (LFM) with binned or unbinned data. |
numberOfIterations |
The number of iterations for normalization. Usually, 20 should be more than enough. |
plotLoss |
Optional boolean parameter, to determine if the loss function should be plotted. Defaults to FALSE. |
A list containing the normalized, triangular matrix finalLFM
, the dataframes with the row sums
IPFrowsums
and the column sums IPFcolsums
of every iteration, and a vector with the loss function
for every iteration lossFunction
.
1 2 3 | M <- matrix(c(3,0,0,0,7,0,1,9,7),3,3)
M <- Matrix::Matrix(M, sparse = TRUE)
normalizedLFM <- normalize_LFM_iteratively(M, 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.