Learn R Programming

softImpute (version 1.4-3)

Incomplete-class: Class "Incomplete"

Description

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

Arguments

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"

Methods

as.matrix

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

coerce

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

complete

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

Author

Trevor Hastie and Rahul Mazumder

See Also

biScale,softImpute,Incomplete,impute,complete

Examples

Run this code

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

Run the code above in your browser using DataLab