normalizeMatrix: Normalizes a matrix.

normalizeMatrixR Documentation

Normalizes a matrix.

Description

Normalizes a count matrix X for correspondence analysis and returns the corresponding metric. The normalization for X is as follows: First the row sums of X are computed, giving the weights for each sample. These weights are stored in a matrix D, which defines an inner product on the columns of X. Then the vectors of counts stored in the rows of X are replaced with proportions, and the resulting matrix is centered according to the inner product defined by D. Both the centered data matrix and D are returned to the user.

Usage

normalizeMatrix(X)

Arguments

X

The matrix to be normalized.

Value

A list with the normalized matrix (Xtilde) and the row weights (D).


adaptiveGPCA documentation built on Dec. 8, 2022, 5:12 p.m.