MLPACK  1.0.10
Public Member Functions | Static Public Member Functions | List of all members
mlpack::amf::NMFMultiplicativeDivergenceUpdate Class Reference

Public Member Functions

 NMFMultiplicativeDivergenceUpdate ()
 
template<typename MatType >
void Initialize (const MatType &dataset, const size_t rank)
 

Static Public Member Functions

template<typename MatType >
static void HUpdate (const MatType &V, const arma::mat &W, arma::mat &H)
 The update rule for the encoding matrix H. More...
 
template<typename MatType >
static void WUpdate (const MatType &V, arma::mat &W, const arma::mat &H)
 The update rule for the basis matrix W. More...
 

Detailed Description

Definition at line 40 of file nmf_mult_div.hpp.

Constructor & Destructor Documentation

mlpack::amf::NMFMultiplicativeDivergenceUpdate::NMFMultiplicativeDivergenceUpdate ( )
inline

Definition at line 44 of file nmf_mult_div.hpp.

Member Function Documentation

template<typename MatType >
static void mlpack::amf::NMFMultiplicativeDivergenceUpdate::HUpdate ( const MatType &  V,
const arma::mat &  W,
arma::mat &  H 
)
inlinestatic

The update rule for the encoding matrix H.

The formula used is

\[ H_{a\mu} \leftarrow H_{a\mu} \frac{\sum_{i} W_{ia} V_{i\mu}/(WH)_{i\mu}} {\sum_{k} H_{ka}} \]

The function takes in all the matrices and only changes the value of the H matrix.

Parameters
VInput matrix to be factorized.
WBasis matrix.
HEncoding matrix to updated.

Definition at line 109 of file nmf_mult_div.hpp.

template<typename MatType >
void mlpack::amf::NMFMultiplicativeDivergenceUpdate::Initialize ( const MatType &  dataset,
const size_t  rank 
)
inline

Definition at line 47 of file nmf_mult_div.hpp.

template<typename MatType >
static void mlpack::amf::NMFMultiplicativeDivergenceUpdate::WUpdate ( const MatType &  V,
arma::mat &  W,
const arma::mat &  H 
)
inlinestatic

The update rule for the basis matrix W.

The formula used is

\[ W_{ia} \leftarrow W_{ia} \frac{\sum_{\mu} H_{a\mu} V_{i\mu}/(WH)_{i\mu}} {\sum_{\nu} H_{a\nu}} \]

The function takes in all the matrices and only changes the value of the W matrix.

Parameters
VInput matrix to be factorized.
WBasis matrix to be updated.
HEncoding matrix.

Definition at line 67 of file nmf_mult_div.hpp.


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