psvd-package | R Documentation |
The power method is used to compute simultaneously the eigenvectors of a square symmetric matrix. Using the classical method, all eigenvectors are computed. The method used here allows to compute the first r eigenvectors using only matrix multiplications and the Gram-Schmidt orthogonalization algorithm. The relationships between the eigendecomposition factors, on the one hand, and the PCA factors or SVD factors, on the order hand, are used to get SVD or PCA results).
Package: | psvd |
Type: | Package |
Version: | 0.1-0 |
Date: | 2024-10-02 |
License: | GPL (>= 2) |
Package psvd has the following functions:
calcSVD(): | Given a data matrix X of size (m,n), m >=n, this function allows to compute |
the singular value decomposition. | |
calcPCA(): | Given a data matrix X of size (m,n), m >=n, this function allows to\ compute |
the principal component analysis. | |
mGS(): | Modified Gramf-Schmidt orthogonalization method, R code, internal use. |
mGSc(): | Modified Gramf-Schmidt orthogonalization method, C code, internal use. |
eigenV(): | Computation of the eigenvectors matrix for a symmetric square matrix using |
the power method, R Code, internal use. | |
eigenVc(): | Computation of the eigenvectors matrix for a symmetric square matrix using |
the power method, C Code, internal use. |
Doulaye Dembele: doulaye@igbmc.fr
Dembele D. (2024), Manuscript in preparation
data(iris)
X <- as.matrix(iris[,1:4])
rownames(X) <- iris[,5]
res <- calcSVD(X, r=4)
res$d
res$v
res$iter
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.