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.
AlternateSVD(x, r, pred = NULL, max.iter = 10, TOL = 1e-04)
an N by n data matrix
a numeric, number of latent factors to estimate
an n by s matrix, each column is a vector of known covariates for n samples, s covariates are considered, default to NULL
a numeric, maximum number of iteration allowed, default to 10
a numeric, tolerance level for the algorithm to converge, default to 1e-04
a vector of length N, noise standard deviations for N genes
an N by s matrix, estimated coefficients for known covariates
an N by r matrix, estimated latent loadings
an n by r matrix, estiamted latent factors