Learn R Programming

filling (version 0.2.4)

fill.SoftImpute: SoftImpute : Spectral Regularization

Description

fill.SoftImpute implements convex relaxation techniques to generate a sequence of regularized low-rank solutions for matrix completion problems. For the nuclear norm optimization problem, it uses soft thresholding technique iteratively in that the algorithm returns several matrices in accordance with the provided vector of regularization parameters \(\lambda\) (lambdas).

Usage

fill.SoftImpute(A, lambdas = c(10, 1, 0.1), maxiter = 100, tol = 0.001)

Value

a named list containing

X

an \((n\times p\times t)\) cubic array after completion at each lambda value.

Arguments

A

an \((n\times p)\) partially observed matrix.

lambdas

a length-\(t\) vector regularization parameters.

maxiter

maximum number of iterations to be performed.

tol

stopping criterion for an incremental progress.

References

mazumder_spectral_2010filling

See Also

fill.HardImpute

Examples

Run this code
## load image data of 'lena128'
data(lena128)

## transform 5% of entries into missing
A <- aux.rndmissing(lena128, x=0.05)

## apply the method with 3 lambda values
fill <- fill.SoftImpute(A, lambdas=c(500,100,50))

## visualize
opar <- par(no.readonly=TRUE)
par(mfrow=c(2,2), pty="s")
image(A, col=gray((0:100)/100), axes=FALSE, main="5% missing")
image(fill$X[,,1], col=gray((0:100)/100), axes=FALSE, main="lambda=500")
image(fill$X[,,2], col=gray((0:100)/100), axes=FALSE, main="lambda=100")
image(fill$X[,,3], col=gray((0:100)/100), axes=FALSE, main="lambda=50")
par(opar)

Run the code above in your browser using DataLab