Description Usage Arguments Author(s) Examples
matrixcomplete
Function for performing matrix completion using a majorization-minimization algorithm given data matrix X
1 2 | matrixcomplete(X, Z, omega, lambda, maxiter = 100, tol = 1e-04,
liveupdates = TRUE)
|
X |
Data matrix to be completed |
Z |
Matrix containing last iterates |
omega |
Vector containing indices of unobserved entries |
lambda |
Softhreshold parameter |
maxiter |
(Optional) Max number of iterations (Default: 100) |
tol |
(Optional) Tolerance for convergence (Default: 1e-4) |
liveupdates |
(Optional) If FALSE, no notification will be given upon completion of each iteration. (Default: TRUE) |
Jocelyn T. Chi
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # (Examples not run)
# Generate an m-by-n test matrix of rank r
# seed <- 12345
# m <- 1000
# n <- 1000
# r <- 5
# T <- testmatrix(m,n,r,seed=seed)
# Add some noise to the test matrix
# E <- 0.1*matrix(rnorm(m*n),m,n)
# A <- T + E
# Obtain a vector of unobserved entries
# temp <- makeOmega(m,n,percent=0.5)
# omega <- temp$omega
# Remove unobserved entries from test matrix
# X <- A
# X[omega] <- NA
# Make initial model matrix Z and find initial lambda
# Z <- matrix(0,m,n)
# lambda <- init.lambda(X,omega)
# Example (Not run)
# Sol <- matrixcomplete(X,Z,omega,lambda)
|
Loading required package: ggplot2
Loading required package: grid
Loading required package: Matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.