14 #ifndef __MLPACK_METHODS_AMF_COMPLETE_INCREMENTAL_TERMINATION_HPP 15 #define __MLPACK_METHODS_AMF_COMPLETE_INCREMENTAL_TERMINATION_HPP 30 template<
class TerminationPolicy>
40 TerminationPolicy
tPolicy = TerminationPolicy()) :
48 template<
class MatType>
88 return tPolicy.IsConverged(W, H);
123 #endif // __MLPACK_METHODS_AMF_COMPLETE_INCREMENTAL_TERMINATION_HPP TerminationPolicy & TPolicy()
Modify the wrapped termination policy.
size_t iteration
Current iteration number.
const TerminationPolicy & TPolicy() const
Access the wrapped termination policy.
const size_t & MaxIterations() const
Access upper limit of iteration count.
Linear algebra utility functions, generally performed on matrices or vectors.
void Initialize(const MatType &V)
Initializes the termination policy before stating the factorization.
const size_t & Iteration() const
Get current iteration count.
void Initialize(const arma::sp_mat &V)
Initializes the termination policy before stating the factorization.
const double & Index() const
Get current value of residue.
size_t & MaxIterations()
Modify maximum number of iterations.
TerminationPolicy tPolicy
Wrapped termination policy.
This class acts as a wrapper for basic termination policies to be used by SVDCompleteIncrementalLearn...
CompleteIncrementalTermination(TerminationPolicy tPolicy=TerminationPolicy())
Empty constructor.
bool IsConverged(arma::mat &W, arma::mat &H)
Check if termination criterion is met, if the current iteration means that each point has been visite...
size_t incrementalIndex
Number of iterations after which wrapped termination policy will be called.