Skip to content
Implementation of Frequent-Directions algorithm for efficient matrix sketching [E. Liberty, SIGKDD2013]
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Prepare for CRAN (#4) Apr 17, 2019
inst/examples
man Add vignette (#7) May 11, 2019
tests
vignettes Add vignette (#7) May 11, 2019
.Rbuildignore Prepare for CRAN (#4) Apr 17, 2019
.gitignore Add vignette (#7) May 11, 2019
.travis.yml First release (#1) Apr 8, 2019
DESCRIPTION
LICENSE First release (#1) Apr 8, 2019
NAMESPACE
README.Rmd Add vignette (#7) May 11, 2019
README.md Add vignette (#7) May 11, 2019
frequentdirections.Rproj First release (#1) Apr 8, 2019

README.md

frequentdirections Build Status

Implementation of Frequent-Directions algorithm for efficient matrix sketching [E. Liberty, SIGKDD2013]

Installation

# Not yet onCRAN
install.packages("frequentdirections")

# Or the development version from GitHub:
install.packages("devtools")
devtools::install_github("shinichi-takayanagi/frequentdirections")

Example

# (Meaningless) dummy data
size_col <- 50
size_row <- 10^3
x <- matrix(
  c(rnorm(size_row * size_col), rnorm(size_row * size_col, mean=1)),
  ncol = size_col, byrow = TRUE
)
x <- scale(x)
y <- rep(1:2, each=size_row)
# Show 2D plot using SVD
frequentdirections::plot_svd(x, y)

# Matrix Skethinc(l=6)
b <- frequentdirections::sketching(x, 6, 10^(-8))
# Show 2D plot using sketched matrix and show similar result with the above
# That means that 6 dim is enough to express the original data matrix (x)
frequentdirections::plot_svd(x, y, b)

For more details using real world data, See vignette.

You can’t perform that action at this time.