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 (NMFfit) `compare`(object, ...) S4 (list) `compare`(object, ...) S4 (NMFList) `summary`(object, sort.by = NULL, select = NULL, ...) S4 (NMFList,missing) `plot`(x, y, skip = -1, ...) S4 (NMF.rank) `consensusmap`(object, ...) S4 (list) `consensusmap`(object, layout, Rowv = FALSE, main = names(object), ...)
summary,NMFListor to the
summarymethod of each fit.
data.frame. The column are given by their names (partially matched). The column names are the names of the summary measures returned by the
summarymethods of the corresponding NMF results.
data.frameis sorted. The sorting direction (increasing or decreasing) is computed internally depending on the chosen criteria (e.g. decreasing for the cophenetic coefficient, increasing for the residuals).
NMFListobject that contains fits from separate NMF runs.
layoutfrom the package
skip=1L(default) only the initial residual -- that is computed before any iteration, is skipped, if present in the track (it associated with iteration 0).
NULL(to be consistent with
heatmap): compute a dendrogram from hierarchical clustering using the distance and clustering methods
NA: disable any ordering. In this case, and if not otherwise specified with argument
revC=FALSE, the heatmap shows the input matrix with the rows in their original order, with the first row on top to the last row at the bottom. Note that this differ from the behaviour or
heatmap, but seemed to be a more sensible choice when vizualizing a matrix without reordering.
nrow(x)), that specifies the row order. As in the case
Rowv=NA, the ordered matrix is shown first row on top, last row at the bottom.
reorderfunwhen clustering the rows (see the respective argument descriptions for a list of accepted values). If
Rowvhas no names, then the first element is used for
distfun, the second (if present) is used for
hclustfun, and the third (if present) is used for
FALSE: the dendrogram is computed using methods
reorderfunbut is not shown.
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
signature(object = "list"): Draw a single plot with a heatmap of the consensus matrix of each element in the list
signature(x = "NMFList", y = "missing"):
plotplot on a single graph the residuals tracks for each fit in
x. See function
nmffor details on how to enable the tracking of residuals.
signature(object = "NMFList"):
summary,NMFListcomputes 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
NAvalues 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.