NmfDecomposition<T>
Models & Types ยท AiDotNet.DecompositionMethods.MatrixDecomposition
Implements Non-negative Matrix Factorization (NMF) for matrices with non-negative elements.
Inheritance: MatrixDecompositionBase<T> โ NmfDecomposition<T>
For Beginners
NMF is a way to break down a matrix containing only non-negative values (zero or positive numbers) into two simpler matrices W and H, where V ~= W * H. Think of it like finding hidden patterns or features in your data.
How It Works
For example, if you have a matrix of movie ratings (all non-negative), NMF can discover:
- W: How much each user likes different movie genres (features)
- H: How much each movie belongs to different genres (features)
Common applications include:
- Topic modeling in text documents
- Image processing and feature extraction
- Collaborative filtering in recommendation systems
- Audio source separation
- Bioinformatics data analysis
Constructors
| Constructor | Summary |
|---|---|
NmfDecomposition(Matrix<T> matrix, int? components, int maxIterations, double tolerance) |
Initializes a new instance of the NMF decomposition for the specified matrix. |
Properties
| Property | Summary |
|---|---|
Matrix<T> H { get; set; } |
Gets the coefficient matrix H (weights/encodings). |
Matrix<T> W { get; set; } |
Gets the basis matrix W (features/components). |
int Components { get; set; } |
Gets the number of components (features) used in the factorization. |
Methods
| Method | Summary |
|---|---|
Matrix<T> Reconstruct() |
Reconstructs the original matrix from the factorization. |
Vector<T> Solve(Vector<T> b) |
Solves a linear system Ax = b using the NMF decomposition. |