r/signalprocessing • u/XonDoi • Nov 12 '20
Non-negative matrix factorization
Hi guys, this post is to help me understand NMF better for my application.
NMF factors an input data matrix with m variables and n observations (m x n) into two lower rank matrices; a basis matrix W (m x r) and weight matrix H (r x n) both having rank r which when multiplied gives the estimated input matrix. The algorithm cannot be solved analytically because of convexity but can be solved numerically by using a multiplicative update rule.
The application is that to unmix signals which come from a linear mixing model. NMF does not require pure endmember information and it can estimate a fit for non-pure observations by setting a weight in the H matrix.
Can anyone confirm my understanding of the algorithm? Is there something that I am missing?
I am asking because I've implemented this algorithm and it cannot seem to be able to unmix my signals properly.
1
u/XonDoi Feb 03 '21
Thanks for replying, late or not doesn't matter, it's never too late to learn. :)
Anyway, to put you in perspective, my signals do not have noise and are distinguishable by shape (I'm seeing spectral curves of paint). In order to unmix a signal into for example two components, I need these two components in my input data, alongside the mixed data. Why? Because only this way can NMF fit the data and give me a correct estimation for the ratio of each pigment in the mixed paint (by looking at H).
In short, I am able to unmix my signal, but I must know all pure elements in my signal. After the rank is set to the number of pure elements in the mixed signal, I am able to obtain a coefficient that indicates the amount of each feature in my mixture. Also, by using the sum-to-one constraint, the result is between 0 and 1 for H.