12 #ifndef _MLPACK_METHODS_AMF_INCOMPLETE_INCREMENTAL_TERMINATION_HPP 13 #define _MLPACK_METHODS_AMF_INCOMPLETE_INCREMENTAL_TERMINATION_HPP 27 template <
class TerminationPolicy>
37 TerminationPolicy
tPolicy = TerminationPolicy()) :
45 template<
class MatType>
69 return tPolicy.IsConverged(W, H);
void Initialize(const MatType &V)
Initializes the termination policy before stating the factorization.
size_t & MaxIterations()
Modify maximum number of iterations.
Linear algebra utility functions, generally performed on matrices or vectors.
size_t iteration
Current iteration count.
The core includes that mlpack expects; standard C++ includes and Armadillo.
const TerminationPolicy & TPolicy() const
Access the wrapped termination policy.
const size_t & Iteration() const
Get current iteration count.
TerminationPolicy & TPolicy()
Modify the wrapped termination policy.
size_t incrementalIndex
Number of iterations after which wrapped class object will be called.
TerminationPolicy tPolicy
Wrapped termination policy.
IncompleteIncrementalTermination(TerminationPolicy tPolicy=TerminationPolicy())
Empty constructor.
const double & Index() const
Get current value of residue.
bool IsConverged(arma::mat &W, arma::mat &H)
Check if termination criterio is met.
size_t MaxIterations() const
Access maximum number of iterations.
This class acts as a wrapper for basic termination policies to be used by SVDIncompleteIncrementalLea...