NMFOffset-class: NMF Model - Nonnegative Matrix Factorization with Offset

Description Usage Arguments Details Creating objects from the Class Initialize method Methods (by generic) References See Also Examples

Description

This class implements the Nonnegative Matrix Factorization with Offset model, required by the NMF with Offset algorithm.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S4 method for signature 'NMFOffset'
show(object)

## S4 method for signature 'NMFOffset'
initialize(.Object, ..., offset)

## S4 method for signature 'NMFOffset'
offset(object)

## S4 method for signature 'NMFOffset'
fitted(object, W, H, offset = object@offset)

Arguments

object

an instance of class NMFOffset.

.Object

an object of class NMFOffset that serves as a template to initialize the object to be created.

...

other arguments passed as object slot values.

offset

offset vector

W

a optional matrix to use in the computation as the basis matrix in place of basis(object). It must be compatible with the coefficient matrix used in the computation. That is, number of columns in W = number of rows in the mixture coefficient matrix coef(object) or H (if provided).

H

a optional matrix to use in the computation as the coefficient matrix in place of coef(object). It must be compatible with the basis matrix used in the computation. That is, number of rows in H = number of columns in the basis matrix basis(object) or W (if provided).

Details

The NMF with Offset algorithm is defined by Badea (2008) as a modification of the euclidean based NMF algorithm from Lee2001 (see section Details and references below). It aims at obtaining 'cleaner' factor matrices, by the introduction of an offset matrix, explicitly modelling a feature specific baseline – constant across samples.

Creating objects from the Class

Object of class NMFOffset can be created using the standard way with operator new

However, as for all NMF model classes – that extend class NMF, objects of class NMFOffset should be created using factory method nmfModel :

new('NMFOffset')

nmfModel(model='NMFOffset')

nmfModel(model='NMFOffset', W=w, offset=rep(1, nrow(w)))

See nmfModel for more details on how to use the factory method.

Initialize method

The initialize method for NMFOffset objects tries to correct the initial value passed for slot offset, so that it is consistent with the dimensions of the NMF model: it will pad the offset vector with NA values to get the length equal to the number of rows in the basis matrix.

Methods (by generic)

References

Badea L (2008). “Extracting gene expression profiles common to colon and pancreatic adenocarcinoma using simultaneous nonnegative matrix factorization.” _Pacific Symposium on Biocomputing. Pacific Symposium on Biocomputing_, *290*, 267-78. ISSN 1793-5091, <URL: http://www.ncbi.nlm.nih.gov/pubmed/18229692>.

See Also

Other NMF-model: NMFns-class, NMFstd-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 
# create a completely empty NMF object
new('NMFOffset')

# create a NMF object based on random (compatible) matrices
n <- 50; r <- 3; p <- 20
w <- rmatrix(n, r) 
h <- rmatrix(r, p)
nmfModel(model='NMFOffset', W=w, H=h, offset=rep(0.5, nrow(w)))

# apply Nonsmooth NMF algorithm to a random target matrix
V <- rmatrix(n, p)
## Not run: nmf(V, r, 'offset')

# random NMF model with offset  
rnmf(3, 10, 5, model='NMFOffset')

renozao/NMF documentation built on June 14, 2020, 9:35 p.m.