Implementation of Frequent-Directions algorithm for efficient matrix sketching [E. Liberty, SIGKDD2013]
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



Implementation of Frequent-directions algorithm for efficient matrix sketching [Liberty2013] .


Locate on your current directory. Run the following commands on pyton console:

>>> import fd_sketch
>>> import numpy as np
>>> a = np.random.randn(1000, 100)
>>> b = fd_sketch.sketch(a, 150)
>>> b
>>> fd_sketch.calculateError(a, b)

Run unit test contains unit tests for fd_sketch.

$ python

Run USPS PCA sample

Download the USPS hand-written image dataset from the following URL and extract the archived zip.train file into ./data/elem/usps/.

Then run the sample script and get the plot figures in result directory.

$ mkdir result
$ python

More details

We refer the interested users to the original conference paper for detailed algorithm, theoretial analysis, and performance evaluations.

[Liberty2013]Edo. Liberty, "Simple and Deterministic Matrix Sketching", ACM SIGKDD, 2013.