NMFMultiplicativeDistanceUpdate Class Reference

The multiplicative distance update rules for matrices W and H. More...

Public Member Functions

 NMFMultiplicativeDistanceUpdate ()
 
template
<
typename
MatType
>
void Initialize (const MatType &, const size_t)
 Initialize the factorization. More...

 
template
<
typename
Archive
>
void serialize (Archive &, const uint32_t)
 Serialize the object (in this case, there is nothing to serialize). More...

 

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

The multiplicative distance update rules for matrices W and H.

This follows a method described in the following paper:

@inproceedings{lee2001algorithms,
title={Algorithms for non-negative matrix factorization},
author={Lee, D.D. and Seung, H.S.},
booktitle={Advances in Neural Information Processing Systems 13
(NIPS 2000)},
pages={556--562},
year={2001}
}

This is a multiplicative rule that ensures that the Frobenius norm $ \sqrt{\sum_i \sum_j(V-WH)^2} $ is non-increasing between subsequent iterations. Both of the update rules for W and H are defined in this file.

Definition at line 39 of file nmf_mult_dist.hpp.

Constructor & Destructor Documentation

◆ NMFMultiplicativeDistanceUpdate()

Definition at line 43 of file nmf_mult_dist.hpp.

Member Function Documentation

◆ HUpdate()

static void 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{(W^T V)_{a\mu}}{(W^T WH)_{a\mu}} \]

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 be updated.

Definition at line 92 of file nmf_mult_dist.hpp.

◆ Initialize()

void Initialize ( const MatType &  ,
const size_t   
)
inline

Initialize the factorization.

These update rules hold no information, so the input parameters are ignored.

Definition at line 50 of file nmf_mult_dist.hpp.

◆ serialize()

void serialize ( Archive &  ,
const uint32_t   
)
inline

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

Definition at line 101 of file nmf_mult_dist.hpp.

◆ WUpdate()

static void WUpdate ( const MatType &  V,
arma::mat &  W,
const arma::mat &  H 
)
inlinestatic

The update rule for the basis matrix W.

The formula used isa

\[ W_{ia} \leftarrow W_{ia} \frac{(VH^T)_{ia}}{(WHH^T)_{ia}} \]

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 70 of file nmf_mult_dist.hpp.


The documentation for this class was generated from the following file:
  • /home/ryan/src/mlpack.org/_src/mlpack-git/src/mlpack/methods/amf/update_rules/nmf_mult_dist.hpp