26 #ifndef __MLPACK_METHODS_NMF_RANDOM_ACOL_INIT_HPP
27 #define __MLPACK_METHODS_NMF_RANDOM_ACOL_INIT_HPP
49 template<
typename MatType>
55 const size_t n = V.n_rows;
56 const size_t m = V.n_cols;
60 Log::Warn <<
"Number of random columns is more than the number of columns"
61 <<
"available in the V matrix; weird results may ensue!" << std::endl;
67 for (
size_t col = 0; col < r; col++)
69 for (
size_t randCol = 0; randCol < p; randCol++)
static void Initialize(const MatType &V, const size_t r, arma::mat &W, arma::mat &H)
This class initializes the W matrix of the NMF algorithm by averaging p randomly chosen columns of V...
static util::PrefixedOutStream Warn
Prints warning messages prefixed with [WARN ].
int RandInt(const int hiExclusive)
Generates a uniform random integer.
RandomAcolInitialization()