calcDecompError | R Documentation |
Function to compute Forbenius norm between two sets of matrix.
Computes sum of Forbenius norm for
matrix_initial[[i]] - u[[i]] diag(delta[[i]]) t(v)
for
all i.
calcDecompError(matrix_initial, u, delta, v)
matrix_initial |
list with initial Di matrices |
u |
U_i values computed using SBF/A-SBF function |
delta |
delta_i values computed using SBF/A-SBF function |
v |
V computed using SBF/A-SBF function |
a numeric value for the factorization error
# create test dataset set.seed(1231) mymat <- createRandomMatrices(n = 4, ncols = 3, nrows = 4:6) # SBF call. Estimate V using the sum of Di^TDi sbf <- SBF(matrix_list = mymat) # calculate decomposition error decomperror <- calcDecompError(mymat, sbf$u, sbf$delta, sbf$v) # load gene expression dataset avg_counts <- SBF::TissueExprSpecies # call sbf sbf <- SBF(matrix_list = avg_counts) # calculate decomposition error decomperror <- calcDecompError(avg_counts, sbf$u, sbf$delta, sbf$v)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.