Description Usage Arguments Author(s) Examples
init.lambda
Function for finding an initial value for lambda
1 | init.lambda(X, omega)
|
X |
Original data matrix |
omega |
Set of unobserved indices |
Jocelyn T. Chi
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # Generate a test matrix
seed <- 12345
m <- 100
n <- 100
r <- 3
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
init.lambda(X,omega)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.