Description Usage Arguments Value References Examples
In many circumstances, it is natural to assume that there exists an underlying low-rank structure. The assumption of low-rank property leads to an optimization problem for matrix completion problem,
\mathrm{minimize}\quad rank(X)
\mathrm{s.t}~~ X_{ij}=A_{ij} ~~\mathrm{for}~~ A_{ij} \in E
where A_{ij}\in E means the (i,j)-th entry of data matrix A is not missing. The objective function can be further relaxed by nuclear norm
\|X\|_* = ∑ σ_i(X)
where σ_i (X) is i-th singular value of the matrix X. Note that
for modeling purpose, we adopted closeness parameter tolerance
for equality constraint.
CVXR package was used in implementation. Computational efficiency may not be guaranteed for large data matrix.
1 | fill.nuclear(A, tolerance = 0.001)
|
A |
an (n\times p) partially observed matrix. |
tolerance |
level of tolerance for entrywise equality condition. |
a named list containing
an (n\times p) matrix after completion.
solution of the minimization problem; approximate rank.
“optimal” denotes the problem was solved. See psolve
for more details on solvability.
the number of iterations taken.
type of solver used by CVXR.
candes_exact_2009filling
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
## load image data of 'lena64'
data(lena64)
## transform 5% of entries into missing
A <- aux.rndmissing(lena64, x=0.05)
## apply the method
filled <- fill.nuclear(A)
## visualize
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,2), pty="s")
image(A, col=gray((0:100)/100), axes=FALSE, main="5% missing")
image(filled$X, col=gray((0:100)/100), axes=FALSE, main="processed")
par(opar)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.