Learn R Programming

sddpack (version 0.9)

sdd: Semidiscrete Decomposition

Description

The semidiscrete decomposition (SDD) approximates a matrix as a weighted sum of outer products formed by vectors with entries constrained to be in the set {-1, 0, 1}.

Usage

sdd(A, kmax = 100, alphamin = 0.01, lmax = 100, rhomin = 10e-20)

Arguments

A
matrix of values on which to run sdd
kmax
number of outer-loop iterations (see References)
alphamin
progress check (see References)
lmax
number of inner-loop iterations (see References)
rhomin
threshold test (See References)

Value

  • xmatrix of X's, where A is approximately equal to X%*%diag(D)%*%Y
  • dvector of D's, where A is approximately equal to X%*%diag(D)%*%Y
  • ymatrix of Y's, where A is approximately equal to X%*%diag(D)%*%Y

Details

The semidiscrete decomposition (SDD) approximates a matrix as a weighted sum of outer products formed by vectors with entries constrained to be in the set {-1, 0, 1}.

It is useful for image compression and for latent semantic indexing (LSI) in information retrieval.

The primary advantage of the SDD over other types of matrix approximations such as the truncated singular value decomposition (SVD) is that it typically provides a more accurate approximation for far less storage.

The package has been ported from Matlab code given on http://www.cs.umd.edu/~oleary/SDDPACK/. See the webpage for full documentation.

References

http://www.cs.umd.edu/~oleary/SDDPACK/

Examples

Run this code
A = matrix(rnorm(100), nrow=10)
sdd(A)

Run the code above in your browser using DataLab