powered by
uses random matrix to estimate svd results
randsvd(A, k, seed = NA)
input matrix
rank to use
for testing
randomized svd is output
N. Halko, P.G. Martinsson, J. Tropp "Finding structure with randomness: Stochastic algorithms for constructing approximate matrix decompositions" arXiv 0909.4061
# NOT RUN { A <- matrix(rnorm(3000), ncol=50 ) k=10 dr=randsvd(A,k)$d[1:k] dt=svd(A)$d[1:k] cor(dr,dt) # }
Run the code above in your browser using DataLab