NMFSet-class {NMF}R Documentation

Class to store results from multiple runs of NMF algorithms

Description

Class that extends base class list to store the result from a multiple run of NMF algorithms.

The elements are of class NMF.

Slots

consensus:
Object of class "matrix" used to store the consensus matrix when multiple runs have been performed with option keep.all=FALSE. In this case, only the best factorization is returned, so the object is of length 1. However the consensus matrix across all runs is still computed and stored in this slot.
nrun:
an integer that contains the number of runs when NMF is performed with option keep.all=FALSE.

See nmf.

runtime:
Object of class "proc_time" that contains various measures of the time spent to perform all the runs.
.Data:
standard slot that contains the S3 list object data. See R documentation on S4 classes for more details.

Methods

cophcor
signature(object = "NMFSet"):

Computes the cophenetic correlation coefficient of the consensus matrix associated to the multiple NMF runs described by object. It's been proposed by Brunet et al. (2004) to measure the stability of the clusters obtained by NMF approaches. See cophcor for more details.

compare
signature(x = "NMFSet"): compute summary measures for each element in the list and return them in rows in a data.frame.
connectivity
signature(x = "NMFSet"): compute the consensus matrix of the set of results. That is the mean of the connectivity matrices of each element. See connectivity.
dispersion
signature(object = "NMFSet"):

Computes the dispersion coefficient of the consensus matrix associated to the multiple NMF runs described by object. It's been proposed by Kim and Park (2007) to measure the reproducibility of the clusters. See dispersion for more details.

entropy
signature(x = "NMFSet", class = "ANY"): computes the mean entropy of the set of NMF results. See entropy.
featureNames
signature(object = "NMFSet"): returns the row names of the basis matrix from the best fit of the set of results. If BioConductor is installed this method is defined for the generic function featureNames from the Biobase package.
fit
signature(object = "NMFSet"): returns the element that achieves the lowest residual approximation error.
residuals
signature(object = "NMFSet"): returns the average residuals of the set of results.
errorPlot
signature(x = "NMFSet"): plot on a single graphic the residuals tracks for each of the run. The tracks are normalized against their maximum value, to generate tracks that lies in range [0,1].
join
signature(x = "list"): method to create a NMFSet object from a list of NMFfit or NMFSet objects.
nrun
signature(object = "NMFSet"): returns the number of runs performed to create object. This is not necessarily the length of object that is the number of NMF fits contained in object, nor always the value of slot nrun.

When performing multiple NMF runs with option keep.all=FALSE, only one fit is kept so length(object)=1, but the number of runs is stored in slot nrun. When keep.all=TRUE, slot nrun is not set at all.

See nmf.

metaHeatmap
Produces a heatmap of the consensus matrix using function heatmap.2. See metaHeatmap.
predict
signature(object = "NMFSet"): returns a factor that gives the predicted cluster index for each sample (resp. for each feature) based on the best NMF factorization in the set of results object. The index correspond to the basis vector that most contribute to the sample (resp. to which the feature contribute the most). See predict details on extra arguments.

purity
signature(x = "NMFSet", class = "ANY"): computes the mean purity of the set of NMF results. See purity.
rss
signature(object = "NMFSet"): computes the Residual Sum of Squares (RSS) of the best factorization in the set. See rss.
runtime
signature(object = "NMFSet"): returns the time spent to compute all the runs.
sampleNames
signature(object = "NMFSet"): returns the column names of the mixture coefficient matrix from the best fit of the set of results. If BioConductor is installed this method is defined for the generic function featureNames from the Biobase package.
show
signature(object = "NMFSet"): show method for class NMFSet.
summary
signature(x = "NMFSet"): standard generic summary method for objects of class NMFSet. It computes a set of measures to evaluate the quality of the best factorization of the set. The result is similar to the result from the summary method of NMFfit objects. See NMFfit for details on the computed measures. In addition, the cophenetic correlation coefficient and the dispersion coefficient of the consensus matrix are returned. See methods cophcor and dispersion above.

Author(s)

Renaud Gaujoux renaud@cbio.uct.ac.za

References

Metagenes and molecular pattern discovery using matrix factorization Brunet, J.~P., Tamayo, P., Golub, T.~R., and Mesirov, J.~P. (2004) Proc Natl Acad Sci U S A 101(12), 4164–4169.

Sparse non-negative matrix factorizations via alternating non-negativity-constrained least squares for microarray data analysis Kim, H. & Park, H. (2007) Bioinformatics. http://dx.doi.org/10.1093/bioinformatics/btm134.

See Also

NMF , nmf-methods, NMF-utils

Examples


# generate a synthetic dataset with known classes
n <- 50; counts <- c(5, 5, 8);
V <- syntheticNMF(n, counts, noise=TRUE)

# build the class factor
groups <- as.factor(do.call('c', lapply(seq(3), function(x) rep(x, counts[x]))))

# perform multiple runs of one algorithm
res <- nmf(V, 3, nrun=20)
res

# plot a heatmap of the consensus matrix
## Not run: metaHeatmap(res)

# run multiple methods
res <- nmf(V, 3, list('brunet', 'lee', 'nsNMF'))
# compare the results passing prior knowledge on classes
compare(res, class=groups)


[Package NMF version 0.2.4 Index]