Learn R Programming

NMF (version 0.2.2)

NMFfitX-class: Virtual Class to Handle Results from Multiple Runs of NMF Algorithms

Description

This class defines a common interface to handle the results from multiple runs of a single NMF algorithm, performed with the nmf method.

Arguments

Details

Currently, this interface is implemented by two classes, NMFfitX1 and NMFfitXn, which respectively handle the case where only the best fit is kept, and the case where the list of all the fits is returned.

See nmf for more details on the method arguments.

See Also

Other multipleNMF: NMFfitX1-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)

# perform multiple runs of one algorithm (default is to keep only best fit)
res <- nmf(V, 3, nrun=3)
res

# plot a heatmap of the consensus matrix
consensusmap(res)

# perform multiple runs of one algorithm (keep all the fits)
res <- nmf(V, 3, nrun=3, .options='k')
res

Run the code above in your browser using DataLab