oneLevelNMF: Perform Non-Negative Matrix factorization

Description Usage Arguments Value Author(s) Examples

View source: R/oneLevelNMF.R

Description

Perform Non-Negative Matrix factorization

Usage

1
2
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

1
2
3
4
5
6
7
8
9
# 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)

hNMF documentation built on Jan. 8, 2021, 5:42 p.m.

Related to oneLevelNMF in hNMF...