MLPACK
1.0.11
|
This follows a method described in the paper 'Algorithms for Non-negative Matrix Factorization' by D. More...
Public Member Functions | |
NMFMultiplicativeDivergenceUpdate () | |
template<typename MatType > | |
void | Initialize (const MatType &dataset, const size_t rank) |
Static Public Member Functions | |
template<typename MatType > | |
static void | HUpdate (const MatType &V, const arma::mat &W, arma::mat &H) |
The update rule for the encoding matrix H. More... | |
template<typename MatType > | |
static void | WUpdate (const MatType &V, arma::mat &W, const arma::mat &H) |
The update rule for the basis matrix W. More... | |
This follows a method described in the paper 'Algorithms for Non-negative Matrix Factorization' by D.
D. Lee and H. S. Seung. This is a multiplicative rule that ensures that the Kullback–Leibler divergence is non-increasing between subsequent iterations. Both of the update rules for W and H are defined in this file.
This set of update rules is not meant to work with sparse matrices. Using sparse matrices often causes NaNs in the output, so other choices of update rules are better in that situation.
Definition at line 42 of file nmf_mult_div.hpp.
|
inline |
Definition at line 46 of file nmf_mult_div.hpp.
|
inlinestatic |
The update rule for the encoding matrix H.
The formula used is
The function takes in all the matrices and only changes the value of the H matrix.
V | Input matrix to be factorized. |
W | Basis matrix. |
H | Encoding matrix to updated. |
Definition at line 111 of file nmf_mult_div.hpp.
|
inline |
Definition at line 49 of file nmf_mult_div.hpp.
|
inlinestatic |
The update rule for the basis matrix W.
The formula used is
The function takes in all the matrices and only changes the value of the W matrix.
V | Input matrix to be factorized. |
W | Basis matrix to be updated. |
H | Encoding matrix. |
Definition at line 69 of file nmf_mult_div.hpp.