NMFSet-class {NMF} | R Documentation |
Class that extends base class list
to store the result from a multiple run
of NMF algorithms.
The elements are of class NMF
.
consensus
:"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
:integer
that contains the number of runs when
NMF is performed with option keep.all=FALSE
.
See nmf
.
runtime
:"proc_time"
that contains
various measures of the time spent to perform all the runs..Data
:list
object data.
See R documentation on S4 classes for more details.
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.
signature(x = "NMFSet")
: compute summary measures for
each element in the list and return them in rows in a data.frame
. 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
.
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.
signature(x = "NMFSet", class = "ANY")
: computes the
mean entropy of the set of NMF results. See entropy
.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.
signature(object = "NMFSet")
: returns the element that
achieves the lowest residual approximation error. signature(object = "NMFSet")
: returns the average
residuals of the set of results.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].
signature(x = "list")
:
method to create a NMFSet
object from a list of
NMFfit
or NMFSet
objects. 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
.
heatmap.2
. See metaHeatmap
.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.
signature(x = "NMFSet", class = "ANY")
: computes the
mean purity of the set of NMF results. See purity
.signature(object = "NMFSet")
:
computes the Residual Sum of Squares (RSS) of the best factorization in the
set.
See rss
.
signature(object = "NMFSet")
:
returns the time spent to compute all the runs.
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.
signature(object = "NMFSet")
: show
method for class
NMFSet
. 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.
Renaud Gaujoux renaud@cbio.uct.ac.za
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.
# 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)