| Incomplete-class {softImpute} | R Documentation |
"Incomplete"a sparse matrix inheriting from class dgCMatrix with the NAs
represented as zeros
Objects can be created by calls of the form new("Incomplete", ...).
or by calling the function Incomplete
i:Object of class "integer" ~~
p:Object of class "integer" ~~
Dim:Object of class "integer" ~~
Dimnames:Object of class "list" ~~
x:Object of class "numeric" ~~
factors:Object of class "list" ~~
Class "dgCMatrix", directly.
Class "CsparseMatrix", by class "dgCMatrix", distance 2.
Class "dsparseMatrix", by class "dgCMatrix", distance 2.
Class "generalMatrix", by class "dgCMatrix", distance 2.
Class "dMatrix", by class "dgCMatrix", distance 3.
Class "sparseMatrix", by class "dgCMatrix", distance 3.
Class "compMatrix", by class "dgCMatrix", distance 3.
Class "Matrix", by class "dgCMatrix", distance 4.
signature(x = "Incomplete"): ...
signature(from = "matrix", to = "Incomplete"): ...
signature(x = "Incomplete"): ...
Trevor Hastie and Rahul Mazumder
biScale,softImpute,Incomplete,impute,complete
showClass("Incomplete")
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
xnaC=as(xna,"Incomplete")