ValidationRMSETermination< MatType > Class Template Reference

This class implements validation termination policy based on RMSE index. More...

Public Member Functions

 ValidationRMSETermination (MatType &V, size_t num_test_points, double tolerance=1e-5, size_t maxIterations=10000, size_t reverseStepTolerance=3)
 Create a validation set according to given parameters and nullifies this set in data matrix(training set). More...

 
const double & Index () const
 Get current value of residue. More...

 
void Initialize (const MatType &)
 Initializes the termination policy before stating the factorization. More...

 
bool IsConverged (arma::mat &W, arma::mat &H)
 Check if termination criterio is met. 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 ()
 
const size_t & NumTestPoints () const
 Get number of validation points. More...

 
const double & Tolerance () const
 Access tolerance value. More...

 
double & Tolerance ()
 

Detailed Description


template
<
class
MatType
>

class mlpack::amf::ValidationRMSETermination< MatType >

This class implements validation termination policy based on RMSE index.

The input data matrix is divided into 2 sets, training set and validation set. Entries of validation set are nullifed in the input matrix. Termination criterion is met when increase in validation set RMSe value drops below the given tolerance. To accommodate spikes certain number of successive validation RMSE drops are accepted. This upper imit on successive drops can be adjusted with reverseStepCount. Secondary termination criterion terminates algorithm when iteration count goes above the threshold.

Note
The input matrix is modified by this termination policy.
See also
AMF

Definition at line 37 of file validation_rmse_termination.hpp.

Constructor & Destructor Documentation

◆ ValidationRMSETermination()

ValidationRMSETermination ( MatType &  V,
size_t  num_test_points,
double  tolerance = 1e-5,
size_t  maxIterations = 10000,
size_t  reverseStepTolerance = 3 
)
inline

Create a validation set according to given parameters and nullifies this set in data matrix(training set).

Parameters
VInput matrix to be factorized.
num_test_pointsnumber of validation test points
tolerancethe tolerance value to compare RMSe against
maxIterationsmax iteration count before termination
reverseStepTolerancemax successive RMSE drops allowed

Definition at line 50 of file validation_rmse_termination.hpp.

Member Function Documentation

◆ Index()

const double& Index ( ) const
inline

Get current value of residue.

Definition at line 188 of file validation_rmse_termination.hpp.

◆ Initialize()

void Initialize ( const MatType &  )
inline

Initializes the termination policy before stating the factorization.

Parameters
*(V) Input matrix to be factorized.

Definition at line 95 of file validation_rmse_termination.hpp.

◆ IsConverged()

bool IsConverged ( arma::mat &  W,
arma::mat &  H 
)
inline

Check if termination criterio is met.

Parameters
WBasis matrix of output.
HEncoding matrix of output.

Definition at line 115 of file validation_rmse_termination.hpp.

◆ Iteration()

const size_t& Iteration ( ) const
inline

Get current iteration count.

Definition at line 191 of file validation_rmse_termination.hpp.

◆ MaxIterations() [1/2]

const size_t& MaxIterations ( ) const
inline

Access upper limit of iteration count.

Definition at line 197 of file validation_rmse_termination.hpp.

◆ MaxIterations() [2/2]

size_t& MaxIterations ( )
inline

Definition at line 198 of file validation_rmse_termination.hpp.

◆ NumTestPoints()

const size_t& NumTestPoints ( ) const
inline

Get number of validation points.

Definition at line 194 of file validation_rmse_termination.hpp.

◆ Tolerance() [1/2]

const double& Tolerance ( ) const
inline

Access tolerance value.

Definition at line 201 of file validation_rmse_termination.hpp.

◆ Tolerance() [2/2]

double& Tolerance ( )
inline

Definition at line 202 of file validation_rmse_termination.hpp.


The documentation for this class was generated from the following file: