eigenVc | R Documentation |
This is an internal function which uses a C code to calculate an eidendecomposition of a square symmetric matrix. This function is used in the power method allowing to compute singular values and principal component analysis.
eigenVc(xmat, wp, d, r, itmax, err)
xmat |
Square symmetric matrix of order d. |
wp |
Columns orthogonal matrix of size (d,r), r <= d. |
d |
Number of rows of wp. |
r |
Number of columns of wp. |
itmax |
Maximum number of iterations. |
err |
Tolerance level in the iterative search. |
This function returns a data frame containing 2 components
wc |
Eigenvectors matrix. |
iter |
Number of iterations by the power method. |
d <- 3
r <- 3
w <- c(rnorm(d*r,0,1))
res <- mGSc(w, d, r)
wp <- res$wp
XtX <- c(3,2,1,2,1,0,1,0,1)
res <- eigenVc(XtX, wp, d, r, itmax=100, err=1e-8)
wc <- matrix(res$wc, d, r)
t(wc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.