# generate a synthetic dataset with known classes
n <- 50; counts <- c(5, 5, 8);
V <- syntheticNMF(n, counts, noise=TRUE)
# perform multiple runs of one algorithm (default is to keep only best fit)
res <- nmf(V, 3, nrun=5)
str(res)
# perform multiple runs of one algorithm (keep all the fits)
res <- nmf(V, 3, nrun=5, .options='k')
str(res)
Run the code above in your browser using DataLab