Learn R Programming

NMF (version 0.2.2)

NMFSet-class: Class to store results from multiple runs of NMF algorithms

Description

Class that extends base class list to store the result from a multiple run of NMF algorithms. The elements are of class NMF.

Arguments

References

Metagenes and molecular pattern discovery using matrix factorization Brunet, J.~P., Tamayo, P., Golub, T.~R., and Mesirov, J.~P. (2004) Proc Natl Acad Sci U S A 101(12), 4164--4169. Sparse non-negative matrix factorizations via alternating non-negativity-constrained least squares for microarray data analysis Kim, H. & Park, H. (2007) Bioinformatics. http://dx.doi.org/10.1093/bioinformatics/btm134.

See Also

NMF , nmf-methods, NMF-utils

Examples

Run this code
# generate a synthetic dataset with known classes
n <- 50; counts <- c(5, 5, 8);
V <- syntheticNMF(n, counts, noise=TRUE)

# build the class factor
groups <- as.factor(do.call('c', lapply(seq(3), function(x) rep(x, counts[x]))))

# perform multiple runs of one algorithm
res <- nmf(V, 3, nrun=20)
res

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

# run multiple methods
res <- nmf(V, 3, list('brunet', 'lee', 'nsNMF'))
# compare the results passing prior knowledge on classes
compare(res, class=groups)

Run the code above in your browser using DataLab