28 #ifndef __MLPACK_METHODS_LMF_UPDATE_RULES_NMF_ALS_HPP
29 #define __MLPACK_METHODS_LMF_UPDATE_RULES_NMF_ALS_HPP
45 template<
typename MatType>
46 void Initialize(
const MatType& dataset,
const size_t rank)
64 template<
typename MatType>
65 inline static void WUpdate(
const MatType& V,
71 W = V * H.t() * pinv(H * H.t());
74 for (
size_t i = 0; i < W.n_elem; i++)
95 template<
typename MatType>
96 inline static void HUpdate(
const MatType& V,
100 H = pinv(W.t() * W) * W.t() * V;
103 for (
size_t i = 0; i < H.n_elem; i++)