nmf-topic-modeling

Installation
SKILL.md

NMF Topic Modeling

Overview

Non-negative Matrix Factorization (NMF) decomposes a TF-IDF document-term matrix into two non-negative matrices: W (document-topic) and H (topic-term). The non-negativity constraint produces additive, interpretable topics where each document is a weighted mixture of themes and each theme is a weighted mixture of terms. NMF typically produces more coherent, less overlapping topics than LDA, especially on shorter texts.

When to Use

  • Discovering latent themes across a corpus of documents (posts, comments, articles, reviews)
  • Finding hidden connections between seemingly unrelated content areas
  • Corpus has 100+ documents with substantive text (not just titles or single sentences)
  • Need interpretable, distinct topics with minimal overlap
  • Working with TF-IDF weighted text (NMF strength vs LDA's bag-of-words)

When NOT to use:

  • Corpus has fewer than 50 documents -- too sparse for meaningful factorization
  • Documents are extremely short (under 10 words each) without enrichment strategies
  • You need probabilistic topic distributions with uncertainty estimates (use LDA instead)
  • A single definitive classification is needed (use supervised methods instead)
Installs
1
GitHub Stars
7
First Seen
Jul 5, 2026
nmf-topic-modeling — aaddrick/written-voice-replication