12 #ifndef _MLPACK_METHODS_AMF_VALIDATIONRMSETERMINATION_HPP_INCLUDED 13 #define _MLPACK_METHODS_AMF_VALIDATIONRMSETERMINATION_HPP_INCLUDED 36 template <
class MatType>
56 num_test_points(num_test_points),
77 }
while((t_val = V(t_row, t_col)) == 0);
130 double temp = (t_val - WH(t_row, t_col));
142 if ((
rmseOld -
rmse) / rmseOld < tolerance && iteration > 4)
241 #endif // _MLPACK_METHODS_AMF_VALIDATIONRMSETERMINATION_HPP_INCLUDED size_t reverseStepTolerance
tolerance on successive residue drops
bool isCopy
indicates whether a copy of information is available which corresponds to minimum residue point ...
double rmseOld
rmse values
const size_t & MaxIterations() const
Access upper limit of iteration count.
Linear algebra utility functions, generally performed on matrices or vectors.
size_t num_test_points
number of validation test points
size_t reverseStepCount
successive residue drops
The core includes that mlpack expects; standard C++ includes and Armadillo.
arma::mat test_points
validation point matrix
const size_t & Iteration() const
Get current iteration count.
This class implements validation termination policy based on RMSE index.
const double & Index() const
Get current value of residue.
const double & Tolerance() const
Access tolerance value.
arma::mat W
variables to store information of minimum residue point
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 ...
const size_t & NumTestPoints() const
Get number of validation points.
size_t iteration
current iteration count
void Initialize(const MatType &)
Initializes the termination policy before stating the factorization.
bool IsConverged(arma::mat &W, arma::mat &H)
Check if termination criterio is met.
size_t maxIterations
max iteration limit
double tolerance
tolerance