mlpack  master
Public Member Functions | Static Public Member Functions | List of all members
mlpack::amf::AverageInitialization Class Reference

This initialization rule initializes matrix W and H to root of the average of V, perturbed with uniform noise. More...

Public Member Functions

 AverageInitialization ()
 
template<typename Archive >
void Serialize (Archive &, const unsigned int)
 Serialize the object (in this case, there is nothing to do). More...
 

Static Public Member Functions

template<typename MatType >
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. More...
 

Detailed Description

This initialization rule initializes matrix W and H to root of the average of V, perturbed with uniform noise.

Uniform noise is generated by Armadillo's 'randu' function. For better performance, the lowest element of the matrix is subtracted from the average before dividing it by the factorization rank. This computed value is added with the random noise.

Definition at line 27 of file average_init.hpp.

Constructor & Destructor Documentation

mlpack::amf::AverageInitialization::AverageInitialization ( )
inline

Definition at line 31 of file average_init.hpp.

Member Function Documentation

template<typename MatType >
static void mlpack::amf::AverageInitialization::Initialize ( const MatType &  V,
const size_t  r,
arma::mat &  W,
arma::mat &  H 
)
inlinestatic

Initialize the matrices W and H to the average value of V with uniform random noise added.

Parameters
VInput matrix.
rRank of matrix.
WW matrix, to be initialized.
HH matrix, to be initialized.

Definition at line 43 of file average_init.hpp.

template<typename Archive >
void mlpack::amf::AverageInitialization::Serialize ( Archive &  ,
const unsigned  int 
)
inline

Serialize the object (in this case, there is nothing to do).

Definition at line 79 of file average_init.hpp.


The documentation for this class was generated from the following file: