Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
tjulitianyi d27cb0a904 | 1 year ago | |
---|---|---|
R | 1 year ago | |
data | 1 year ago | |
man | 1 year ago | |
tests/testthat | 1 year ago | |
.travis.yml | 1 year ago | |
DESCRIPTION | 1 year ago | |
NAMESPACE | 1 year ago | |
README.md | 1 year ago | |
rsvd.png | 1 year ago |
Randomized singular value decomposition (rsvd) is a fast probabilistic algorithm that can
be used to compute the near optimal low-rank singular value decomposition of massive data sets with high accuracy.
The key idea is to compute a compressed representation
of the data to capture the essential information. This compressed representation can then be used to obtain
the low-rank singular value decomposition decomposition. The rsvd package provides one of the fastest routines for low-rank matrix approximations in R, as far as we know.
The computational advantage becomes pronounced with an increasing matrix dimension (here target-rank k=50):
The singular value decomposition plays a central role in data analysis and scientific computing.
The SVD is also widely used for computing
(randomized) principal component analysis (PCA), a linear dimensionality reduction technique.
Randomized PCA (rpca) uses the approximated singular value decomposition
to compute the most significant principal components. This package also includes a
function to compute (randomized) robust principal component analysis (RPCA).
In addition several plot functions are provided. See for further details: Randomized Matrix Decompositions using R.
library(rsvd)
data(tiger)
# Image compression using randomized SVD
s <- rsvd(tiger, k=150)
tiger.re = s$u %*% diag(s$d) %*% t(s$v) # reconstruct image
# Display orginal and reconstrucuted image
par(mfrow=c(1,2))
image(tiger, col = gray((0:255)/255))
image(tiger.re, col = gray((0:255)/255))
and the speedup gained over the base SVD function:
library(microbenchmark)
timing_svd <- microbenchmark(
'SVD' = svd(tiger, nu=150, nv=150),
'rSVD' = rsvd(tiger, k=150),
times=50)
print(timing_svd, unit='s')
Install the rsvd package via CRAN
install.packages("rsvd")
You can also install the development version from GitHub using devtools:
devtools::install_github("erichson/rsvd")
The source packge can be obtained here: CRAN: rsvd.
@Article{,
title = {Randomized Matrix Decompositions Using {R}},
author = {N. Benjamin Erichson and Sergey Voronin and Steven L.
Brunton and J. Nathan Kutz},
journal = {Journal of Statistical Software},
year = {2019},
volume = {89},
number = {11},
pages = {1--48},
doi = {10.18637/jss.v089.i11},
}
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》