Description Usage Arguments Value Author(s) Examples

Perform Non-Negative Matrix factorization

1 2 | ```
oneLevelNMF(X, rank, initData = NULL, method = "PGNMF", nruns = 10,
checkDivergence = TRUE)
``` |

`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 |

Scaled NMF model (in accordance with the NMF package definition)

Nicolas Sauwen

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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.