oneLevelNMF {hNMF} | R Documentation |
Perform Non-Negative Matrix factorization
Description
Perform Non-Negative Matrix factorization
Usage
oneLevelNMF(X, rank, initData = NULL, method = "PGNMF", nruns = 10,
checkDivergence = TRUE)
Arguments
X |
input matrix. Each column represents one observation and the rows correspond to the different features |
rank |
number of NMF components to be found |
initData |
either of the NMF factor matrices, with initial values |
method |
name of the NMF method to be used. "PGNMF" (default) and "HALSacc" are available by default. Any method from the NMF package can also be specified |
nruns |
number of NMF runs. It is recommended to run the NMF analyses multiple times when random seeding is used, to avoid a suboptimal solution |
checkDivergence |
Boolean indicating whether divergence checking should be performed |
Value
Scaled NMF model (in accordance with the NMF package definition)
Author(s)
Nicolas Sauwen
Examples
# random data
X <- matrix(runif(10*20), 10,20)
# 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)
[Package hNMF version 1.0 Index]