Thenmfbin R package provides a simple Non-Negative Matrix Factorization (NMF) implementation tailored for binary data matrices. It offers a choice of initialization methods, loss functions and updating algorithms.
NMF is typically used for reducing high-dimensional matrices into lower (k-) rank ones wherek is chosen by the user. Given a non-negative matrixX of size, NMF looks for two non-negative matricesW () andH (), such that:
In topic modelling, ifX is a word-document matrix thenW can be interpreted as the word-topic matrix andH as the topic-document matrix.
Unlike most other NMF packages,nmfbin is focused on binary (Boolean) data, while keeping the number of dependencies to a minimum. For more information see thewebsite.
Installation
You can install the development version ofnmfbin fromGitHub with:
# install.packages("remotes")remotes::install_github("michalovadek/nmfbin")