22 #ifndef __MLPACK_METHODS_AMF_AVERAGE_INIT_HPP
23 #define __MLPACK_METHODS_AMF_AVERAGE_INIT_HPP
43 template<
typename MatType>
55 for(
typename MatType::const_row_col_iterator it = V.begin();it != V.end();it++)
61 if(*it < min) min = *it;
64 V_avg = sqrt(((V_avg / (n * m)) - min) / r);
This initialization rule initializes matrix W and H to root of average of V with uniform noise...
static void Initialize(const MatType &V, const size_t r, arma::mat &W, arma::mat &H)