12 #ifndef MLPACK_METHODS_AMF_AVERAGE_INIT_HPP 13 #define MLPACK_METHODS_AMF_AVERAGE_INIT_HPP 42 template<
typename MatType>
48 const size_t n = V.n_rows;
49 const size_t m = V.n_cols;
57 for (
typename MatType::const_row_col_iterator it = V.begin();
67 avgV = sqrt(((avgV / (n * m)) - min) / r);
78 template<
typename Archive>
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
This initialization rule initializes matrix W and H to root of the average of V, perturbed with unifo...
void Serialize(Archive &, const unsigned int)
Serialize the object (in this case, there is nothing to do).
static void Initialize(const MatType &V, const size_t r, arma::mat &W, arma::mat &H)
Initialize the matrices W and H to the average value of V with uniform random noise added...