| lambda0 | R Documentation | 
lambda such that
softImpute(x,lambda) returns the zero solution.this determines the "starting" lambda for a sequence of values for
softImpute, and all nonzero solutions would require a smaller value
for lambda.
lambda0(x, lambda = 0, maxit = 100, trace.it = FALSE, thresh = 1e-05)
| x | An m by n matrix. Large matrices can be in "sparseMatrix" format,
as well as "SparseplusLowRank". The latter arise after centering sparse
matrices, for example with  | 
| lambda | As in  | 
| maxit | maximum number of iterations. | 
| trace.it | with  | 
| thresh | convergence threshold, measured as the relative changed in the Frobenius norm between two successive estimates. | 
It is the largest singular value for the matrix, with zeros replacing
missing values. It uses svd.als with rank=2.
a single number, the largest singular value
Trevor Hastie, Rahul Mazumder
 Maintainer: Trevor Hastie
hastie@stanford.edu
Rahul Mazumder, Trevor Hastie and Rob Tibshirani (2010)
Spectral Regularization Algorithms for Learning Large Incomplete
Matrices, https://hastie.su.domains/Papers/mazumder10a.pdf
 Journal of Machine Learning Research 11 (2010) 2287-2322
softImpute,Incomplete, and svd.als.
set.seed(101)
n=200
p=100
J=50
np=n*p
missfrac=0.3
x=matrix(rnorm(n*J),n,J)%*%matrix(rnorm(J*p),J,p)+matrix(rnorm(np),n,p)/5
ix=seq(np)
imiss=sample(ix,np*missfrac,replace=FALSE)
xna=x
xna[imiss]=NA
lambda0(xna)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.