12 #ifndef MLPACK_METHODS_AMF_COMPLETE_INCREMENTAL_TERMINATION_HPP 13 #define MLPACK_METHODS_AMF_COMPLETE_INCREMENTAL_TERMINATION_HPP 28 template<
class TerminationPolicy>
38 TerminationPolicy
tPolicy = TerminationPolicy()) :
46 template<
class MatType>
86 return tPolicy.IsConverged(W, H);
121 #endif // MLPACK_METHODS_AMF_COMPLETE_INCREMENTAL_TERMINATION_HPP TerminationPolicy & TPolicy()
Modify the wrapped termination policy.
size_t iteration
Current iteration number.
const size_t & MaxIterations() const
Access upper limit of iteration count.
const TerminationPolicy & TPolicy() const
Access the wrapped termination policy.
const size_t & Iteration() const
Get current 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.
void Initialize(const arma::sp_mat &V)
Initializes the termination policy before stating the factorization.
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.
const double & Index() const
Get current value of residue.