NMF Multiplicative Updates for Kullback-Leibler Divergence
Multiplicative updates from Lee et al. (2001) for standard Nonnegative Matrix Factorization models V \approx W H, where the distance between the target matrix and its NMF estimate is measured by the Kullback-Leibler divergence.
the updated basis and coefficient matrices respectively.
They use a C++ implementation which is optimised
for speed and memory usage.
implement the same updates in plain R.
1 2 3 4 5 6 7 8 9
current basis matrix
current coefficient matrix
number of fixed basis terms
number of fixed coefficient terms
logical that indicates if the update should
be made on the original matrix directly (
already computed NMF estimate used to compute the denominator term.
The coefficient matrix (
H) is updated as follows:
H_kj <- H_kj ( sum_i [ W_ik V_ij / (WH)_ij ] ) / ( sum_i W_ik )
These updates are used in built-in NMF algorithms
The basis matrix (
W) is updated as follows:
W_ik <- W_ik ( sum_u [H_kl A_il / (WH)_il ] ) / ( sum_l H_kl )
a matrix of the same dimension as the input matrix to
the returned matrix uses the same memory as the input
Update definitions by Lee2001.
C++ optimised implementation by Renaud Gaujoux.
Lee DD and Seung H (2001). "Algorithms for non-negative matrix factorization." _Advances in neural information processing systems_. <URL: http://scholar.google.com/scholar?q=intitle:Algorithms+for+non-negative+matrix+factorization\#0>.
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.