Given a data matrix, the function allows to perform a singular
decomposition using a power method and relationship between SVD factors
and the eigendecomposition factors.
Usage
calcSVD(X, r, eta, q, itmax, err, mySeed)
Value
This function returns a data frame containing 4 components
d
Singular values.
u
Matrix with the right eigenvectors.
v
Matrix with the right eigenvectors.
iter
The number of iterations used in the eigendecomposition.
Arguments
X
Data matrix of size (m,n), m >= n.
r
Rank r approximation, default: r=2.
eta
Power method tuning parameter, default: eta=10.
q
Power method tuning parameter, default: q=2.
itmax
Maximum number of iteration in the power method,
default: itmax=200.
err
Tolerance level in the power method, default: err=1e-8.
mySeed
An integer allowing to reproduce results from
two different runs, default: mySeed=50.