optimizeFactorization | R Documentation |
Function iteratively updates u, delta, and V and decreases the decomposition error.
optimizeFactorization( mat_list, u, d, v, optimizeV = TRUE, initial_exact = FALSE, max_iter = 10000, tol = 1e-10, verbose = FALSE )
mat_list |
A list containing numeric matrices |
u |
A list containing U matrices |
d |
A list containing delta matrices |
v |
V matrix |
optimizeV |
Whether initial V should be update or not. Default TRUE |
initial_exact |
Whether the initial value of U, Delta, and V gives exact factorization. Default FALSE |
max_iter |
Maximum number of iterations. In each iteration u, d, and v are updated. Default 1e4 |
tol |
Tolerance value. During the iterations, if the difference between previous best and current best factorization error becomes less than tol, no more iteration is performed. Default tol = 1e-10 |
verbose |
print error at each update. Default FALSE |
a list containing optimal U, delta, and V that minimizes the factorization error
set.seed(1231) mymat <- createRandomMatrices(n = 3, ncols = 3, nrows = 3) sbf <- SBF(matrix_list = mymat, orthogonal = FALSE, transform_matrix = FALSE) newU <- updateU(mymat, sbf$delta, sbf$v) newDelta <- updateDelta(mymat, newU, sbf$v) newV <- updateV(mymat, newU, newDelta) opt <- optimizeFactorization(mymat, newU, newDelta, newV, max_iter = 1e4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.