MLPACK
1.0.11
|
This class implements a method titled 'Alternating Least Squares' described in the paper 'Positive Matrix Factorization: A Non-negative Factor Model with Optimal Utilization of Error Estimates of Data Values' by P Paatero and U Tapper. More...
Public Member Functions | |
NMFALSUpdate () | |
Empty constructor required for the UpdateRule template. More... | |
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 class implements a method titled 'Alternating Least Squares' described in the paper 'Positive Matrix Factorization: A Non-negative Factor Model with Optimal Utilization of Error Estimates of Data Values' by P Paatero and U Tapper.
It uses least squares projection formula to reduce the error value of by alternately calculating W and H respectively while holding the other matrix constant.
Definition at line 38 of file nmf_als.hpp.
|
inline |
Empty constructor required for the UpdateRule template.
Definition at line 42 of file nmf_als.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 be updated. |
Definition at line 95 of file nmf_als.hpp.
|
inline |
Definition at line 45 of file nmf_als.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 64 of file nmf_als.hpp.