train_nmf_topics
Apply Non-negative Matrix Factorization to discover coherent topics from documents, returning top words and document assignments.
Instructions
Train NMF (Non-negative Matrix Factorization) topic model on documents. Often produces more coherent topics than LDA using matrix factorization. Returns topics with top words and document assignments.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| num_topics | No | Number of topics to discover (default: 10) | |
| max_iter | No | Maximum iterations (default: 200) | |
| random_state | No | Random seed for reproducibility (default: 42) |