Description Usage Arguments Value Examples
View source: R/mse.R View source: R/RcppExports.R
Mean squared error of factor models "W" and "H" given "A"
1 |
A |
dgCMatrix of samples (columns) by features (rows) |
W |
matrix of class "matrix" with factors (columns) by features (rows) |
H |
matrix of class "matrix" with samples (columns) by factors (rows) |
detail |
Whether to calculate residual and imputed error for both entire and zero-masked inputs |
If detail = FALSE, returns only mean squared error. If detail = TRUE, returns a list of:
mse: mean squared error, mean((A - W * H)^2)
err.imp: imputed signal in W and H not in A, given by (A - W * H)_>0
err.res: residual signal in A not in W and H, given by (A - W * H)_>0
zm.err.mse: mean squared error for all non-zero values in A
zm.err.imp: imputed signal for all non-zero values in A, regardless of whether they are non-zero in W * H
zm.err.res: residual signal for all non-zero values in A, regardless of whether they are non-zero in W * H
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.