thresh.nuclear {rpca}R Documentation

Thresholding operator

Description

Thresholding operator, an application of the shrinkage operator on a singular value decomposition: D[X] = U S[Sigma] V . For description see section 5 of Candès, E. J., Li, X., Ma, Y., & Wright, J. (2011). Robust principal component analysis?.

Usage

thresh.nuclear(M, thr)

Arguments

M

a rectangular matrix.

thr

threshold >= 0 to shrink singular values with.

Value

Returned is a thresholded Singular Value Decomposition with thr subtracted from singular values, and values smaller than 0 dropped together with their singular vectors.

u, d, vt

as in return value of La.svd

L

the resulting low-rank matrix: L = U D V^t

References

Candès, E. J., Li, X., Ma, Y., & Wright, J. (2011). Robust principal component analysis?. Journal of the ACM (JACM), 58(3), 11

Yuan, X., & Yang, J. (2009). Sparse and low-rank matrix decomposition via alternating direction methods. preprint, 12.

See Also

thresh.l1

Examples

## The function is currently defined as
function (M, thr) {
    s <- La.svd.cmp(M)
    dd <- thresh.l1(s$d, thr)
    id <- which(dd != 0)
    s$d <- dd[id]
    s$u <- s$u[, id, drop = FALSE]
    s$vt <- s$vt[id, , drop = FALSE]
    s$L <- s$u %*% (s$d * s$vt)
    s
  }

l<-thresh.nuclear(matrix(runif(600),nrow=20),2)
l$d

[Package rpca version 0.2.3 Index]