Description Usage Arguments Value Author(s) Examples
Hierarchical non-negative matrix factorization.
1 | hNMF(nmfInput, nmfMethod = "HALSacc")
|
nmfInput |
List with NMF input attributes |
nmfMethod |
String referring to the NMF algorithm to be used. |
Resulting NMF model (in accordance with NMF package definition)
Nicolas Sauwen
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # create nmfInput object
X <- matrix(runif(10*20), 10,20)
bgImageTensor <- array(0,dim=dim(X))
selectVect <- array(1,dim=dim(X))
nmfInput <- NULL
nmfInput$numRows <- nrow(X)
nmfInput$numCols <- ncol(X)
nmfInput$numSlices <- 1
nmfInput$bgImageTensor <- bgImageTensor
nmfInput$selectVect <- selectVect
# run NMF with default algorithm, 5 runs with random initialization
NMFresult1 <- oneLevelNMF(X, rank=2, nruns=5)
# run NMF with specified algorithm and with initialized sources
W0 <- initializeSPA(X,3)
NMFresult2 <- oneLevelNMF(X, rank=3, method="HALSacc", initData = W0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.