pcg | R Documentation |
PCG method for solving A1 X B1 + ... + AR X BR + eps X = Y
using the preconditioner (A1 x B1 + eps I)^(-1)
pcg(Est, Y, eps, Ig = NULL, tol = 1e-10)
Est |
list of 3 giving the left-hand side, produced by
|
Y |
the right-hand side matrix |
eps |
ridge regularization constant |
Ig |
the initial guess, random by default |
tol |
the tolerance used for stopping |
list of 2: U
- the solution X as a matrix;
iter
- the number of iterations
X <- array(runif(20*3*4),c(20,3,4)) X_new <- array(runif(3*4),c(3,4)) Est <- scd_est(X,R=2) Y <- apply_lhs(Est, X_new) X_hat <- pcg(Est, Y, 1e-5) norm(X_new - X_hat$U, type="F")/norm(X_new, type="F")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.