14 #ifndef _MLPACK_METHODS_AMF_SIMPLE_TOLERANCE_TERMINATION_HPP_INCLUDED
15 #define _MLPACK_METHODS_AMF_SIMPLE_TOLERANCE_TERMINATION_HPP_INCLUDED
32 template <
class MatType>
83 for(
size_t i = 0;i < n;i++)
85 for(
size_t j = 0;j < m;j++)
88 if((temp = (*
V)(i,j)) != 0)
90 temp = (temp - WH(i, j));
200 #endif // _MLPACK_METHODS_AMF_SIMPLE_TOLERANCE_TERMINATION_HPP_INCLUDED
Linear algebra utility functions, generally performed on matrices or vectors.
size_t reverseStepCount
successive residue drops
const size_t & Iteration() const
Get current iteration count.
size_t iteration
current iteration count
double tolerance
tolerance
SimpleToleranceTermination(const double tolerance=1e-5, const size_t maxIterations=10000, const size_t reverseStepTolerance=3)
empty constructor
const MatType * V
pointer to matrix being factorized
bool isCopy
indicates whether a copy of information is available which corresponds to minimum residue point ...
arma::mat W
variables to store information of minimum residue poi
size_t reverseStepTolerance
tolerance on successive residue drops
const double & Index() const
Get current value of residue.
static util::PrefixedOutStream Info
Prints informational messages if –verbose is specified, prefixed with [INFO ].
Include all of the base components required to write MLPACK methods, and the main MLPACK Doxygen docu...
size_t maxIterations
iteration threshold
This class implements residue tolerance termination policy.
void Initialize(const MatType &V)
Initializes the termination policy before stating the factorization.
bool IsConverged(arma::mat &W, arma::mat &H)
Check if termination criterio is met.
double residueOld
residue values
const double & Tolerance() const
Access tolerance value.
const size_t & MaxIterations() const
Access upper limit of iteration count.