28 #ifndef __MLPACK_METHODS_NMF_ALS_UPDATE_RULES_HPP
29 #define __MLPACK_METHODS_NMF_ALS_UPDATE_RULES_HPP
56 template<
typename MatType>
57 inline static void Update(
const MatType& V,
63 W = V * H.t() * pinv(H * H.t());
66 for (
size_t i = 0; i < W.n_elem; i++)
96 template<
typename MatType>
97 inline static void Update(
const MatType& V,
101 H = pinv(W.t() * W) * W.t() * V;
104 for (
size_t i = 0; i < H.n_elem; i++)
The update rule for the basis matrix W.
HAlternatingLeastSquaresRule()
static void Update(const MatType &V, const arma::mat &W, arma::mat &H)
The update function that actually updates the H matrix.
The update rule for the encoding matrix H.
static void Update(const MatType &V, arma::mat &W, const arma::mat &H)
The update function that actually updates the W matrix.
WAlternatingLeastSquaresRule()