loss_function: Loss function

Description Usage Arguments Value Examples

View source: R/normalization.R

Description

Loss function of the iterative proportional fitting algorithm

Usage

1
loss_function(rowsums, colsums)

Arguments

rowsums

The current row sums of the matrix

colsums

The current column sums of the matrix

Value

A decimal number giving the loss function of the current row and column sums.

Examples

1
2
3
M <- matrix(c(3,0,1,0,7,9,1,9,7),3,3)
M <- Matrix::Matrix(M, sparse = TRUE)
lf <- loss_function(Matrix::rowSums(M), Matrix::colSums(M))

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