Class "Incomplete"

Share:

Description

a sparse matrix inheriting from class dgCMatrix with the NAs represented as zeros

Objects from the Class

Objects can be created by calls of the form new("Incomplete", ...). or by calling the function Incomplete

Slots

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" ~~

Extends

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.

Methods

as.matrix

signature(x = "Incomplete"): ...

coerce

signature(from = "matrix", to = "Incomplete"): ...

complete

signature(x = "Incomplete"): ...

Author(s)

Trevor Hastie and Rahul Mazumder

See Also

biScale,softImpute,Incomplete,impute,complete

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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")