eigenV | R Documentation |
This is an internal function which uses a R 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.
eigenV(xmat, wp, itmax, err)
xmat |
Square symmetric matrix of order d. |
wp |
Columns orthogonal matrix of size (d,r), r <= d. |
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
w <- matrix(rnorm(d*d,0,1), ncol=d)
wp <- mGS(w)
XtX <- matrix(c(3,2,1,2,1,0,1,0,1), ncol=3)
res <- eigenV(XtX, wp, itmax=100, err=1e-8)
t(res$wc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.