Movatterモバイル変換


[0]ホーム

URL:


Skip to contents

nmfbin: Non-Negative Matrix Factorization for Binary Data

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 sizem×nm \times n, NMF looks for two non-negative matricesW (m×km \times k) andH (k×nk \times n), such that:

XW×HX \approx W \times H

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

Usage

The input matrix can only contain 0s and 1s.

# loadlibrary(nmfbin)# Create a binary matrix for demonstrationX<-matrix(sample(c(0,1),100, replace=TRUE), ncol=10)# Perform Logistic NMFresults<-nmfbin(X, k=3, optimizer="mur", init="nndsvd", max_iter=1000)

Citation

@Manual{,  title = {nmfbin: Non-Negative Matrix Factorization for Binary Data},  author = {Michal Ovadek},  year = {2023},  note = {R package version 0.2.1},  url = {https://michalovadek.github.io/nmfbin/},}

Contributions

Contributions to thenmfbin package are more than welcome. Please submit pull requests or open an issue for discussion.

Links

License

Citation

Developers

  • Michal Ovadek
    Author, maintainer, copyright holder

Dev status

  • CRAN status
  • R-CMD-check

[8]ページ先頭

©2009-2025 Movatter.jp