AlternateSVD: Alternating singular value decomposition
Description
The algorithm alternates between 1) computing latent loadings u and latent variable v and 2) estimating noise standard deviation for each of the N genes.
Usage
AlternateSVD(x, r, pred = NULL, max.iter = 10, TOL = 1e-04)
Arguments
x
an N by n data matrix
r
a numeric, number of latent factors to estimate
pred
an n by s matrix, each column is a vector of known covariates for n samples, s covariates are considered, default to NULL
max.iter
a numeric, maximum number of iteration allowed, default to 10
TOL
a numeric, tolerance level for the algorithm to converge, default to 1e-04
Value
sigmaa vector of length N, noise standard deviations for N genes
coefan N by s matrix, estimated coefficients for known covariates