Description Usage Arguments Value References See Also Examples
If the assumed underlying model has sufficiently many zeros, the LASSO type
shrinkage estimator is known to overestimate the number of non-zero coefficients.
fill.HardImpute
aims at overcoming such difficulty via low-rank assumption
and hard thresholding idea, well-known concept in conventional regression analysis.
In algorithmic aspect, it takes output of SoftImpute
as warm-start matrices
for iterative estimation process.
1 2 3 4 5 6 7 | fill.HardImpute(
A,
lambdas = c(10, 1, 0.1),
maxiter = 100,
tol = 0.001,
rk = (min(dim(A)) - 1)
)
|
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. |
rk |
assumed rank of the matrix. |
a named list containing
an (n\times p\times t) cubic array after completion at each lambda
value.
mazumder_spectral_2010filling
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## 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 rank conditions
fill1 <- fill.HardImpute(A, lambdas=c(500,100,50), rk=10)
fill2 <- fill.HardImpute(A, lambdas=c(500,100,50), rk=50)
fill3 <- fill.HardImpute(A, lambdas=c(500,100,50), rk=100)
## visualize only the last ones from each run
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(fill1$X[,,3], col=gray((0:100)/100), axes=FALSE, main="Rank 10")
image(fill2$X[,,3], col=gray((0:100)/100), axes=FALSE, main="Rank 50")
image(fill3$X[,,3], col=gray((0:100)/100), axes=FALSE, main="Rank 100")
par(opar)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.