admm.rpca {ADMM} | R Documentation |
Robust Principal Component Analysis
Description
Given a data matrix , it finds a decomposition
where represents a nuclear norm for a matrix
and
, and
a balancing/regularization
parameter. The choice of such norms leads to impose low-rank property for
and
sparsity on
.
Usage
admm.rpca(
M,
lambda = 1/sqrt(max(nrow(M), ncol(M))),
mu = 1,
tol = 1e-07,
maxiter = 1000
)
Arguments
M |
an |
lambda |
a regularization parameter |
mu |
an augmented Lagrangian parameter |
tol |
relative tolerance stopping criterion |
maxiter |
maximum number of iterations |
Value
a named list containing
- L
an
low-rank matrix
- S
an
sparse matrix
- history
dataframe recording iteration numerics. See the section for more details.
Iteration History
For RPCA implementation, we chose a very simple stopping criterion
for each iteration step . So for this method, we provide a vector of only relative errors,
- error
relative error computed
References
Candès EJ, Li X, Ma Y, Wright J (2011). “Robust principal component analysis?” Journal of the ACM, 58(3), 1–37. ISSN 00045411, doi: 10.1145/1970392.1970395.
Examples
## generate data matrix from standard normal
X = matrix(rnorm(20*5),nrow=5)
## try different regularization values
out1 = admm.rpca(X, lambda=0.01)
out2 = admm.rpca(X, lambda=0.1)
out3 = admm.rpca(X, lambda=1)
## visualize sparsity
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,3))
image(out1$S, main="lambda=0.01")
image(out2$S, main="lambda=0.1")
image(out3$S, main="lambda=1")
par(opar)