22 #ifndef __MLPACK_METHODS_LMF_RANDOM_ACOL_INIT_HPP
23 #define __MLPACK_METHODS_LMF_RANDOM_ACOL_INIT_HPP
47 template<
typename MatType>
53 const size_t n = V.n_rows;
54 const size_t m = V.n_cols;
58 Log::Warn <<
"Number of random columns is more than the number of columns"
59 <<
"available in the V matrix; weird results may ensue!" << std::endl;
65 for (
size_t col = 0; col < r; col++)
67 for (
size_t randCol = 0; randCol < p; randCol++)
Linear algebra utility functions, generally performed on matrices or vectors.
RandomAcolInitialization()
static void Initialize(const MatType &V, const size_t r, arma::mat &W, arma::mat &H)
static util::PrefixedOutStream Warn
Prints warning messages prefixed with [WARN ].
This class initializes the W matrix of the AMF algorithm by averaging p randomly chosen columns of V...
int RandInt(const int hiExclusive)
Generates a uniform random integer.