hNMF: Hierarchical non-negative matrix factorization.

Description Usage Arguments Value Author(s) Examples

View source: R/hNMF.R

Description

Hierarchical non-negative matrix factorization.

Usage

1
hNMF(nmfInput, nmfMethod = "HALSacc")

Arguments

nmfInput

List with NMF input attributes

nmfMethod

String referring to the NMF algorithm to be used.

Value

Resulting NMF model (in accordance with NMF package definition)

Author(s)

Nicolas Sauwen

Examples

 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)

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

Related to hNMF in hNMF...