compare-NMF | R Documentation |
The functions documented here allow to compare the fits computed in different NMF runs. The fits do not need to be from the same algorithm, nor have the same dimension.
## S4 method for signature 'NMFfit'
compare(object, ...)
## S4 method for signature 'list'
compare(object, ...)
## S4 method for signature 'NMFList'
summary(object, sort.by = NULL,
select = NULL, ...)
## S4 method for signature 'NMFList,missing'
plot(x, y, skip = -1, ...)
## S4 method for signature 'NMF.rank'
consensusmap(object, ...)
## S4 method for signature 'list'
consensusmap(object, layout,
Rowv = FALSE, main = names(object), ...)
... |
extra arguments passed by |
select |
the columns to be output in the result
|
sort.by |
the sorting criteria, i.e. a partial match
of a column name, by which the result |
x |
an |
y |
missing |
layout |
specification of the layout. It may be a
single numeric or a numeric couple, to indicate a square
or rectangular layout respectively, that is filled row by
row. It may also be a matrix that is directly passed to
the function |
object |
an object computed using some algorithm, or that describes an algorithm itself. |
skip |
an integer that indicates the number of
points to skip/remove from the beginning of the curve. If
|
Rowv |
clustering specification(s) for the rows. It allows to specify the distance/clustering/ordering/display parameters to be used for the rows only. Possible values are:
|
main |
Main title as a character string or a grob. |
The methods compare
enables to compare multiple
NMF fits either passed as arguments or as a list of fits.
These methods eventually call the method
summary,NMFList
, so that all its arguments can be
passed named in ...
.
signature(object = "NMFfit")
:
Compare multiple NMF fits passed as arguments.
signature(object = "list")
:
Compares multiple NMF fits passed as a standard list.
signature(object =
"NMF.rank")
: Draw a single plot with a heatmap of the
consensus matrix obtained for each value of the rank, in
the range tested with nmfEstimateRank
.
signature(object = "list")
:
Draw a single plot with a heatmap of the consensus matrix
of each element in the list object
.
signature(x = "NMFList", y =
"missing")
: plot
plot on a single graph the
residuals tracks for each fit in x
. See function
nmf
for details on how to enable the
tracking of residuals.
signature(object = "NMFList")
:
summary,NMFList
computes summary measures for each
NMF result in the list and return them in rows in a
data.frame
. By default all the measures are
included in the result, and NA
values are used
where no data is available or the measure does not apply
to the result object (e.g. the dispersion for single' NMF
runs is not meaningful). This method is very useful to
compare and evaluate the performance of different
algorithms.
#----------
# compare,NMFfit-method
#----------
x <- rmatrix(20,10)
res <- nmf(x, 3)
res2 <- nmf(x, 2, 'lee')
# compare arguments
compare(res, res2, target=x)
#----------
# compare,list-method
#----------
# compare elements of a list
compare(list(res, res2), target=x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.