planc
Parallel Lowrank Approximation with Non-negativity Constraints
Public Member Functions | List of all members
planc::DistNMF< INPUTMATTYPE > Class Template Referenceabstract

#include <distnmf.hpp>

Public Member Functions

 DistNMF (const INPUTMATTYPE &input, const MAT &leftlowrankfactor, const MAT &rightlowrankfactor, const MPICommunicator &communicator)
 There are totally prxpc process. More...
 
const int globalm () const
 returns globalm More...
 
const int globaln () const
 returns globaln More...
 
const double globalsqnorma () const
 returns global squared norm of A More...
 
void compute_error (const uint &ce)
 return the current error More...
 
const bool is_compute_error () const
 returns the flag to compute error or not. More...
 
void algorithm (algotype dat)
 returns the NMF algorithm More...
 
void reportTime (const double temp, const std::string &reportstring)
 Reports the time. More...
 
void normalize_by_W ()
 Column Normalizes the distributed W matrix. More...
 
virtual void computeNMF ()=0
 
MAT getLeftLowRankFactor ()
 Returns the left low rank factor matrix W. More...
 
MAT getRightLowRankFactor ()
 Returns the right low rank factor matrix H. More...
 
void computeObjectiveError ()
 
void computeObjectiveError (const INPUTMATTYPE &At, const MAT &WtW, const MAT &HtH)
 
void num_iterations (const int it)
 Sets number of iterations for the NMF algorithms. More...
 
const unsigned int num_iterations () const
 Returns the number of iterations. More...
 
void regW (const FVEC &iregW)
 Sets the regularization on left low rank factor W. More...
 
FVEC regW ()
 Returns the L2 and L1 regularization parameters of W as a vector. More...
 
void regH (const FVEC &iregH)
 Sets the regularization on right low rank H. More...
 
FVEC regH ()
 Returns the L2 and L1 regularization parameters of W as a vector. More...
 
void clear ()
 Clear the memory for input matrix A, right low rank factor W and left low rank factor H. More...
 

Detailed Description

template<typename INPUTMATTYPE>
class planc::DistNMF< INPUTMATTYPE >

Definition at line 16 of file distnmf.hpp.

Inheritance diagram for planc::DistNMF< INPUTMATTYPE >:
planc::NMF< INPUTMATTYPE > planc::DistAUNMF< INPUTMATTYPE > planc::DistALS< INPUTMATTYPE > planc::DistANLSBPP< INPUTMATTYPE > planc::DistAOADMM< INPUTMATTYPE > planc::DistHALS< INPUTMATTYPE > planc::DistMU< INPUTMATTYPE >

Constructor & Destructor Documentation

◆ DistNMF()

template<typename INPUTMATTYPE >
planc::DistNMF< INPUTMATTYPE >::DistNMF ( const INPUTMATTYPE &  input,
const MAT leftlowrankfactor,
const MAT rightlowrankfactor,
const MPICommunicator communicator 
)
inline

There are totally prxpc process.

Each process will hold the following

Parameters
[in]Aof size $\frac{globalm}{p_r} \times \frac{globaln}{p_c}$
[in]rightlow rank factor H of size $\frac{globaln}{p} \times k$
[in]leftlow rank factor W of size $\frac{globalm}{p} \times k$
[in]MPICommunicator for row and column communicators

Definition at line 43 of file distnmf.hpp.

Member Function Documentation

◆ algorithm()

template<typename INPUTMATTYPE >
void planc::DistNMF< INPUTMATTYPE >::algorithm ( algotype  dat)
inline

returns the NMF algorithm

Definition at line 94 of file distnmf.hpp.

◆ clear()

void planc::NMF< INPUTMATTYPE >::clear ( )
inlineinherited

Clear the memory for input matrix A, right low rank factor W and left low rank factor H.

Definition at line 355 of file nmf.hpp.

◆ compute_error()

template<typename INPUTMATTYPE >
void planc::DistNMF< INPUTMATTYPE >::compute_error ( const uint &  ce)
inline

return the current error

Definition at line 90 of file distnmf.hpp.

◆ computeNMF()

virtual void planc::NMF< INPUTMATTYPE >::computeNMF ( )
pure virtualinherited

◆ computeObjectiveError() [1/2]

void planc::NMF< INPUTMATTYPE >::computeObjectiveError ( )
inlineinherited

Definition at line 238 of file nmf.hpp.

◆ computeObjectiveError() [2/2]

void planc::NMF< INPUTMATTYPE >::computeObjectiveError ( const INPUTMATTYPE &  At,
const MAT WtW,
const MAT HtH 
)
inlineinherited

Definition at line 330 of file nmf.hpp.

◆ getLeftLowRankFactor()

MAT planc::NMF< INPUTMATTYPE >::getLeftLowRankFactor ( )
inlineinherited

Returns the left low rank factor matrix W.

Definition at line 167 of file nmf.hpp.

◆ getRightLowRankFactor()

MAT planc::NMF< INPUTMATTYPE >::getRightLowRankFactor ( )
inlineinherited

Returns the right low rank factor matrix H.

Definition at line 169 of file nmf.hpp.

◆ globalm()

template<typename INPUTMATTYPE >
const int planc::DistNMF< INPUTMATTYPE >::globalm ( ) const
inline

returns globalm

Definition at line 84 of file distnmf.hpp.

◆ globaln()

template<typename INPUTMATTYPE >
const int planc::DistNMF< INPUTMATTYPE >::globaln ( ) const
inline

returns globaln

Definition at line 86 of file distnmf.hpp.

◆ globalsqnorma()

template<typename INPUTMATTYPE >
const double planc::DistNMF< INPUTMATTYPE >::globalsqnorma ( ) const
inline

returns global squared norm of A

Definition at line 88 of file distnmf.hpp.

◆ is_compute_error()

template<typename INPUTMATTYPE >
const bool planc::DistNMF< INPUTMATTYPE >::is_compute_error ( ) const
inline

returns the flag to compute error or not.

Definition at line 92 of file distnmf.hpp.

◆ normalize_by_W()

template<typename INPUTMATTYPE >
void planc::DistNMF< INPUTMATTYPE >::normalize_by_W ( )
inline

Column Normalizes the distributed W matrix.

Definition at line 110 of file distnmf.hpp.

◆ num_iterations() [1/2]

void planc::NMF< INPUTMATTYPE >::num_iterations ( const int  it)
inlineinherited

Sets number of iterations for the NMF algorithms.

Definition at line 340 of file nmf.hpp.

◆ num_iterations() [2/2]

const unsigned int planc::NMF< INPUTMATTYPE >::num_iterations ( ) const
inlineinherited

Returns the number of iterations.

Definition at line 350 of file nmf.hpp.

◆ regH() [1/2]

void planc::NMF< INPUTMATTYPE >::regH ( const FVEC iregH)
inlineinherited

Sets the regularization on right low rank H.

Definition at line 344 of file nmf.hpp.

◆ regH() [2/2]

FVEC planc::NMF< INPUTMATTYPE >::regH ( )
inlineinherited

Returns the L2 and L1 regularization parameters of W as a vector.

Definition at line 348 of file nmf.hpp.

◆ regW() [1/2]

void planc::NMF< INPUTMATTYPE >::regW ( const FVEC iregW)
inlineinherited

Sets the regularization on left low rank factor W.

Definition at line 342 of file nmf.hpp.

◆ regW() [2/2]

FVEC planc::NMF< INPUTMATTYPE >::regW ( )
inlineinherited

Returns the L2 and L1 regularization parameters of W as a vector.

Definition at line 346 of file nmf.hpp.

◆ reportTime()

template<typename INPUTMATTYPE >
void planc::DistNMF< INPUTMATTYPE >::reportTime ( const double  temp,
const std::string &  reportstring 
)
inline

Reports the time.

Definition at line 96 of file distnmf.hpp.


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