mlpack
Public Member Functions | List of all members
mlpack::amf::SimpleToleranceTermination< MatType > Class Template Reference

This class implements residue tolerance termination policy. More...

#include <simple_tolerance_termination.hpp>

Public Member Functions

 SimpleToleranceTermination (const double tolerance=1e-5, const size_t maxIterations=10000, const size_t reverseStepTolerance=3)
 empty constructor
 
void Initialize (const MatType &V)
 Initializes the termination policy before stating the factorization. More...
 
bool IsConverged (arma::mat &W, arma::mat &H)
 Check if termination criterio is met. More...
 
const double & Index () const
 Get current value of residue.
 
const size_t & Iteration () const
 Get current iteration count.
 
const size_t & MaxIterations () const
 Access upper limit of iteration count.
 
size_t & MaxIterations ()
 
const double & Tolerance () const
 Access tolerance value.
 
double & Tolerance ()
 

Detailed Description

template<class MatType>
class mlpack::amf::SimpleToleranceTermination< MatType >

This class implements residue tolerance termination policy.

Termination criterion is met when increase in residue value drops below the given tolerance. To accommodate spikes certain number of successive residue drops are accepted. This upper imit on successive drops can be adjusted with reverseStepCount. Secondary termination criterion terminates algorithm when iteration count goes above the threshold.

See also
AMF

Member Function Documentation

◆ Initialize()

template<class MatType >
void mlpack::amf::SimpleToleranceTermination< MatType >::Initialize ( const MatType &  V)
inline

Initializes the termination policy before stating the factorization.

Parameters
VInput matrix to be factorized.

◆ IsConverged()

template<class MatType >
bool mlpack::amf::SimpleToleranceTermination< MatType >::IsConverged ( arma::mat &  W,
arma::mat &  H 
)
inline

Check if termination criterio is met.

Parameters
WBasis matrix of output.
HEncoding matrix of output.

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