This class acts as a wrapper for basic termination policies to be used by SVDCompleteIncrementalLearning. More...
Public Member Functions | |
CompleteIncrementalTermination (TerminationPolicy tPolicy=TerminationPolicy()) | |
Empty constructor. More... | |
const double & | Index () const |
Get current value of residue. More... | |
template < class MatType > | |
void | Initialize (const MatType &V) |
Initializes the termination policy before stating the factorization. More... | |
void | Initialize (const arma::sp_mat &V) |
Initializes the termination policy before stating the factorization. More... | |
bool | IsConverged (arma::mat &W, arma::mat &H) |
Check if termination criterion is met, if the current iteration means that each point has been visited. More... | |
const size_t & | Iteration () const |
Get current iteration count. More... | |
const size_t & | MaxIterations () const |
Access upper limit of iteration count. More... | |
size_t & | MaxIterations () |
Modify maximum number of iterations. More... | |
const TerminationPolicy & | TPolicy () const |
Access the wrapped termination policy. More... | |
TerminationPolicy & | TPolicy () |
Modify the wrapped termination policy. More... | |
This class acts as a wrapper for basic termination policies to be used by SVDCompleteIncrementalLearning.
This class calls the wrapped class functions after every n calls to main class functions where n is the number of non-zero entries in the matrix being factorized. This is necessary for SVDCompleteIncrementalLearning, because otherwise IsConverged() is called after every point, which is very slow.
Definition at line 29 of file complete_incremental_termination.hpp.
|
inline |
Empty constructor.
tPolicy | object of wrapped class. |
Definition at line 37 of file complete_incremental_termination.hpp.
|
inline |
Get current value of residue.
Definition at line 93 of file complete_incremental_termination.hpp.
|
inline |
Initializes the termination policy before stating the factorization.
V | Input matrix to be factorized. |
Definition at line 48 of file complete_incremental_termination.hpp.
|
inline |
Initializes the termination policy before stating the factorization.
This is a specialization for sparse matrices.
V | Input matrix to be factorized. |
Definition at line 63 of file complete_incremental_termination.hpp.
|
inline |
Check if termination criterion is met, if the current iteration means that each point has been visited.
W | Basis matrix of output. |
H | Encoding matrix of output. |
Definition at line 79 of file complete_incremental_termination.hpp.
|
inline |
Get current iteration count.
Definition at line 96 of file complete_incremental_termination.hpp.
|
inline |
Access upper limit of iteration count.
Definition at line 99 of file complete_incremental_termination.hpp.
|
inline |
Modify maximum number of iterations.
Definition at line 101 of file complete_incremental_termination.hpp.
|
inline |
Access the wrapped termination policy.
Definition at line 104 of file complete_incremental_termination.hpp.
|
inline |
Modify the wrapped termination policy.
Definition at line 106 of file complete_incremental_termination.hpp.