Learn R Programming

NMF (version 0.2.2)

compare-NMF: Comparing Results from Different NMF Runs

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

## S3 method for class 'NMFfit':
compare(object, ...)

## S3 method for class 'list': compare(object, ...)

## S3 method for class 'NMFList': summary(object, sort.by = NULL, select = NULL, ...)

## S3 method for class 'NMFList,missing': plot(x, y, skip = -1, ...)

## S3 method for class 'NMF.rank': consensusmap(object, ...)

## S3 method for class 'list': consensusmap(object, layout, Rowv = FALSE, main = names(object), ...)

Arguments

...
extra arguments passed by compare to summary,NMFList or to the summary method of each fit.
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
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
x
an NMFList object that contains fits from separate NMF runs.
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 skip=1L (default) only the initial residual -- that is computed before any iteration, is skipped, if present in the track (it associated
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:
  • TRUEorNULL(to be consistent with
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 ....

Examples

Run this code
# roxygen generated flag
options(R_CHECK_RUNNING_EXAMPLES_=TRUE)

#----------
# 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)

Run the code above in your browser using DataLab