NMF
Non-Negative Matrix Factorization finds parts-based representations where all factors are non-negative
NMF
Non-Negative Matrix Factorization finds parts-based representations where all factors are non-negative.
When to use:
- Data is non-negative (images, text frequencies, audio spectra)
- Need interpretable parts-based decomposition
- Topic modeling (alternative to LDA)
- Image decomposition
Strengths: Interpretable parts, sparse representations, natural for non-negative data Weaknesses: Requires non-negative data, sensitive to initialization, can be slow
Model Parameters
N Components (default: 2, required) Number of components (parts/topics).
Initialization (default: null) Method to initialize factorization:
- null: Automatically choose (default)
- random: Random initialization (faster)
- nndsvd: SVD-based (deterministic, good for dense)
- nndsvda: NNDSVD with zeros filled with average (for dense)
- nndsvdar: NNDSVD with zeros filled with small random (for sparse)
Max Iterations (default: 200) Maximum iterations for convergence.
Tolerance (default: 0.0001) Convergence threshold.
Random State (default: 42) Seed for reproducibility.