Learn R Programming

NMF (version 0.2.2)

NMFfitX1-class: Structure for Storing the Best Fit Amongst Multiple NMF Runs

Description

This class is used to return the result from a multiple run of a single NMF algorithm performed with function nmf with the -- default -- option keep.all=FALSE (cf. nmf).

Arguments

Details

It extends both classes NMFfitX and NMFfit, and stores a the result of the best fit in its NMFfit structure.

Beside the best fit, this class allows to hold data about the computation of the multiple runs, such as the number of runs, the CPU time used to perform all the runs, as well as the consensus matrix.

Due to the inheritance from class NMFfit, objects of class NMFfitX1 can be handled exactly as the results of single NMF run -- as if only the best run had been performed.

See Also

Other multipleNMF: NMFfitX-class, NMFfitXn-class

Examples

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

# generate a synthetic dataset with known classes
n <- 20; counts <- c(5, 2, 3);
V <- syntheticNMF(n, counts)

# get the class factor
groups <- V$pData$Group

# perform multiple runs of one algorithm, keeping only the best fit (default)
#i.e.: the implicit nmf options are .options=list(keep.all=FALSE) or .options='-k'
res <- nmf(V, 3, nrun=3)
res

# compute summary measures
summary(res)
# get more info
summary(res, target=V, class=groups)

# show computational time
runtime.all(res)

# plot the consensus matrix, as stored (pre-computed) in the object
consensusmap(res, annCol=groups)

Run the code above in your browser using DataLab