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

#include <nmf.hpp>

Public Member Functions

 NMF (const T &input, const unsigned int rank)
 Constructors with an input matrix and low rank. More...
 
 NMF (const T &input, const MAT &leftlowrankfactor, const MAT &rightlowrankfactor)
 Constructor with initial left and right low rank factors Necessary when you want to compare algorithms starting with the same initialization. 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 T &At, const MAT &WtW, const MAT &HtH)
 
void num_iterations (const int it)
 Sets number of iterations for the NMF algorithms. More...
 
void regW (const FVEC &iregW)
 Sets the regularization on left low rank factor W. More...
 
void regH (const FVEC &iregH)
 Sets the regularization on right low rank H. More...
 
FVEC regW ()
 Returns the L2 and L1 regularization parameters of W as a vector. More...
 
FVEC regH ()
 Returns the L2 and L1 regularization parameters of W as a vector. More...
 
const unsigned int num_iterations () const
 Returns the number of iterations. More...
 
 ~NMF ()
 
void clear ()
 Clear the memory for input matrix A, right low rank factor W and left low rank factor H. More...
 

Detailed Description

template<class T>
class planc::NMF< T >

Definition at line 24 of file nmf.hpp.

Inheritance diagram for planc::NMF< T >:
planc::AOADMMNMF< T > planc::BPPNMF< T > planc::HALSNMF< T > planc::MUNMF< T >

Constructor & Destructor Documentation

◆ NMF() [1/2]

template<class T>
planc::NMF< T >::NMF ( const T &  input,
const unsigned int  rank 
)
inline

Constructors with an input matrix and low rank.

Parameters
[in]inputmatrix as reference.
[in]lowrank

Definition at line 119 of file nmf.hpp.

◆ NMF() [2/2]

template<class T>
planc::NMF< T >::NMF ( const T &  input,
const MAT leftlowrankfactor,
const MAT rightlowrankfactor 
)
inline

Constructor with initial left and right low rank factors Necessary when you want to compare algorithms starting with the same initialization.

Definition at line 146 of file nmf.hpp.

◆ ~NMF()

template<class T>
planc::NMF< T >::~NMF ( )
inline

Definition at line 352 of file nmf.hpp.

Member Function Documentation

◆ clear()

template<class T>
void planc::NMF< T >::clear ( )
inline

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.

◆ computeNMF()

template<class T>
virtual void planc::NMF< T >::computeNMF ( )
pure virtual

◆ computeObjectiveError() [1/2]

template<class T>
void planc::NMF< T >::computeObjectiveError ( )
inline

Definition at line 238 of file nmf.hpp.

◆ computeObjectiveError() [2/2]

template<class T>
void planc::NMF< T >::computeObjectiveError ( const T &  At,
const MAT WtW,
const MAT HtH 
)
inline

Definition at line 330 of file nmf.hpp.

◆ getLeftLowRankFactor()

template<class T>
MAT planc::NMF< T >::getLeftLowRankFactor ( )
inline

Returns the left low rank factor matrix W.

Definition at line 167 of file nmf.hpp.

◆ getRightLowRankFactor()

template<class T>
MAT planc::NMF< T >::getRightLowRankFactor ( )
inline

Returns the right low rank factor matrix H.

Definition at line 169 of file nmf.hpp.

◆ num_iterations() [1/2]

template<class T>
void planc::NMF< T >::num_iterations ( const int  it)
inline

Sets number of iterations for the NMF algorithms.

Definition at line 340 of file nmf.hpp.

◆ num_iterations() [2/2]

template<class T>
const unsigned int planc::NMF< T >::num_iterations ( ) const
inline

Returns the number of iterations.

Definition at line 350 of file nmf.hpp.

◆ regH() [1/2]

template<class T>
void planc::NMF< T >::regH ( const FVEC iregH)
inline

Sets the regularization on right low rank H.

Definition at line 344 of file nmf.hpp.

◆ regH() [2/2]

template<class T>
FVEC planc::NMF< T >::regH ( )
inline

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

Definition at line 348 of file nmf.hpp.

◆ regW() [1/2]

template<class T>
void planc::NMF< T >::regW ( const FVEC iregW)
inline

Sets the regularization on left low rank factor W.

Definition at line 342 of file nmf.hpp.

◆ regW() [2/2]

template<class T>
FVEC planc::NMF< T >::regW ( )
inline

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

Definition at line 346 of file nmf.hpp.


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