fill_OptSpace: OptSpace

Description Usage Arguments Value References Examples

Description

OptSpace is an algorithm for matrix completion when a matrix is partially observed. It performs what authors called trimming and projection repeatedly based on singular value decompositions. Original implementation is borrowed from ROptSpace package, which was independently developed by the maintainer. See OptSpace for more details.

Usage

1
fill.OptSpace(A, ropt = NA, niter = 50, tol = 1e-06)

Arguments

A

an (n\times p) partially observed matrix.

ropt

NA to guess the rank, or a positive integer as a pre-defined rank.

niter

maximum number of iterations allowed.

tol

stopping criterion for reconstruction in Frobenius norm.

Value

a named list containing

X

an (n\times p) matrix after completion.

error

a vector of reconstruction errors for each successive iteration.

References

\insertRef

keshavan_matrix_2010filling

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## 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 with different rank assumptions
filled10 <- fill.OptSpace(A, ropt=10)
filled20 <- fill.OptSpace(A, ropt=20)

## visualize
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,3), pty="s")
image(A, col=gray((0:100)/100), axes=FALSE, main="5% missing")
image(filled10$X, col=gray((0:100)/100), axes=FALSE, main="rank 10")
image(filled20$X, col=gray((0:100)/100), axes=FALSE, main="rank 20")
par(opar)

## End(Not run)

filling documentation built on Aug. 21, 2021, 5:09 p.m.