seigen {bigQF}R Documentation

Stochastic singular value decomposition

Description

Extract the leading eigenvalues of a large matrix and their eigenvectors, using random projections.

Usage

ssvd(M, n,U=FALSE, V=FALSE,q=3, p=10) 
seigen(M, n, only.values = TRUE, q = 3, symmetric = FALSE, spd = FALSE, p = 10)

Arguments

M

A square matrix

n

Number of eigenvalues to extract

U,V

If TRUE return the left (respectively, right) singular vectors as well as the singular values

only.values

If TRUE, only extract the eigenvalues, otherwise also extract corresponding eigenvectors

q

Number of power iterations to use in constructing the projection basis (zero or more)

symmetric

If TRUE, assume the matrix is symmetric

spd

If TRUE, assume the matrix is positive definite and use the Nystrom method to improve estimation.

p

The oversampling parameter: number of extra dimensions above n for the random projection

Details

The parameters p and q are as in the reference. Both functions use Algorithm 4.3 to construct a projection; ssvd then uses Algorithm 5.1. With spd=TRUE, seigen uses Algorithm 5.5, otherwise Algorithm 5.3

Value

A list with components

values

eigenvalues

vectors

matrix whose columns are the corresponding eigenvectors

Note

Unlike the Lanczos-type algorithms, this is accurate only for large matrices.

Author(s)

Thomas Lumley

References

Nathan Halko, Per-Gunnar Martinsson, Joel A. Tropp (2010) "Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions" https://arxiv.org/abs/0909.4061.

See Also

ssvd, eigen

Examples

data(sequence)
G<-sequence[1:1000,]
H<-tcrossprod(G)
seigen(H,n=10,spd=TRUE,q=5)


eigen(H, symmetric=TRUE,only.values=TRUE)$values[1:10]

  

[Package bigQF version 1.6 Index]