nmf-compare: Comparing Results from Different NMF Runs

Description Usage Arguments Details Examples

Description

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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## S4 method for signature 'NMFfit'
compare(object, ...)

## S4 method for signature 'NMFfitXn'
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 = -1L, ...)

## S4 method for signature 'NMF.rank'
consensusmap(object, ...)

## S4 method for signature 'list'
consensusmap(object, layout, Rowv = FALSE, main = names(object), ...)

Arguments

object

an object of class NMFfit.

...

extra arguments passed by compare to summary,NMFList or to the summary method of each fit.

sort.by

the sorting criteria, i.e. a partial match of a column name, by which the result data.frame is 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).

select

the columns to be output in the result data.frame. The column are given by their names (partially matched). The column names are the names of the summary measures returned by the summary methods of the corresponding NMF results.

x

an NMFList object that contains fits from separate NMF runs.

y

missing

skip

an integer that indicates the number of points to skip/remove from the beginning of the curve. If 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).

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 layout from the package graphics.

Rowv

clustering specification(s) for the rows. It allows to specify the distance/clustering/ordering/display parameters to be used for the rows only.

See section Row/column ordering and display for details on all supported values.

main

Main title as a character string or a grob.

Details

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 ....

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.

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
x <- rmatrix(20,10)
res <- nmf(x, 3)
res2 <- nmf(x, 2, 'lee')

# compare arguments
compare(res, res2, target=x)


# compare each fits in a multiple runs
res3 <- nmf(x, 2, nrun=3, .opt='k')
compare(res3)
compare(res3, res, res2)
compare(list(res3), res, res2, target=x)

# compare elements of a list
compare(list(res, res2), target=x)

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