rsvd

Randomized Matrix Decompositions using R

https://github.com/erichson/rsvd

Science Score: 33.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
    3 of 5 committers (60.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.1%) to scientific vocabulary

Keywords

cran dimension-reduction matrix-approximation pca principal-component-analysis probabilistic-algorithms randomized-algorithm singular-value-decomposition svd
Last synced: 6 months ago · JSON representation

Repository

Randomized Matrix Decompositions using R

Basic Info
Statistics
  • Stars: 100
  • Watchers: 10
  • Forks: 24
  • Open Issues: 3
  • Releases: 0
Topics
cran dimension-reduction matrix-approximation pca principal-component-analysis probabilistic-algorithms randomized-algorithm singular-value-decomposition svd
Created over 10 years ago · Last pushed almost 5 years ago
Metadata Files
Readme

README.md

Build Status CRAN_Status_Badge

Fast Randomized Singular Value Decomposition using R

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):

speed

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”.

SVD example: Image compression

```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)) ``` Here are the results: tiger

and the speedup gained over the base SVD function:

```R library(microbenchmark)

timing_svd <- microbenchmark( 'SVD' = svd(tiger, nu=150, nv=150), 'rSVD' = rsvd(tiger, k=150), times=50)

print(timing_svd, unit='s') ``` timing

Installation

Install the rsvd package via CRAN R install.packages("rsvd")

You can also install the development version from GitHub using devtools:

r devtools::install_github("erichson/rsvd")

The source packge can be obtained here: CRAN: rsvd.

New in Version 1.0.2

  • Several small issues are fixed.
  • Thanks to Aaron Lun, who has fixed a bug in the rsvd function that occured when nu=0 or nv=0.

New in Version 1.0.0

  • Support for non-default matrix types to deal with large-scale matrices that are held on file, added by Aaron Lun.
  • Fixed a bug which occured runninig rpca with k=1 and retx=TRUE, discovered by Will.

References

Cite as

@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}, }

Owner

  • Name: Ben Erichson
  • Login: erichson
  • Kind: user
  • Location: Berkeley
  • Company: UC Berkeley

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 100
  • Total Committers: 5
  • Avg Commits per committer: 20.0
  • Development Distribution Score (DDS): 0.46
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Benli11 n****e@s****k 54
benli11 e****n@u****u 42
Aaron Lun a****n@c****k 2
LTLA i****s@g****m 1
Oscar Dowson o****w@u****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 8
  • Total pull requests: 3
  • Average time to close issues: 7 days
  • Average time to close pull requests: about 13 hours
  • Total issue authors: 7
  • Total pull request authors: 2
  • Average comments per issue: 2.63
  • Average comments per pull request: 2.33
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • LTLA (2)
  • dsvolkov (1)
  • const-ae (1)
  • barracuda156 (1)
  • pcarbo (1)
  • tinyheero (1)
  • wmacnair (1)
Pull Request Authors
  • LTLA (2)
  • odow (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • cran 16,090 last-month
  • Total docker downloads: 149,404
  • Total dependent packages: 14
    (may contain duplicates)
  • Total dependent repositories: 56
    (may contain duplicates)
  • Total versions: 14
  • Total maintainers: 1
cran.r-project.org: rsvd

Randomized Singular Value Decomposition

  • Versions: 8
  • Dependent Packages: 12
  • Dependent Repositories: 52
  • Downloads: 16,090 Last month
  • Docker Downloads: 149,404
Rankings
Forks count: 2.8%
Dependent repos count: 3.4%
Downloads: 3.8%
Stargazers count: 4.1%
Dependent packages count: 5.0%
Average: 6.6%
Docker downloads count: 20.2%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: r-rsvd
  • Versions: 6
  • Dependent Packages: 2
  • Dependent Repositories: 4
Rankings
Dependent repos count: 16.1%
Dependent packages count: 19.6%
Average: 25.7%
Forks count: 32.4%
Stargazers count: 34.6%
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 4.0.0 depends
  • Matrix * imports
  • ggplot2 * suggests
  • testthat * suggests