Three of the included algorithms in rrecsys (SVD, BPR and wALS) require to iterate a sequence of code until a convergence criterion is met. In analogy to Lenskit, we implemented two loop controllers for iterative updates. The first stops once an iteration count reaches the specified value. The second stops when the error drops under a specified threshold and this condition is met for a pre-defined number of required multiple consecutive iterations.
To display the current setup:
showStoppingCriteria()
## Stopping criteria is defined by the number of loops. Current loop number is: 10 .
## Algorithm that support autoConvergence: FunkSVD, wALS, BPR.
## Show delta error is OFF!
To configure the updater to a specific number of loops:
setStoppingCriteria(nrLoops = 10)
## Stopping criteria is defined by the number of loops. Current loop number is: 10 .
## Algorithm that support autoConvergence: FunkSVD, wALS, BPR.
## Show delta error is OFF!
Default value is set to 10. The threshold controller configuration:
setStoppingCriteria(autoConverge = TRUE, deltaErrorThreshold = 1e-5, minNrLoops = 10)
## Stopping criteria is defined by a threshold on the global delta error(in terms of difference of RMSE on two consecutive iterations).
## WARNING: Current configuration can diverge.You can show or not delta error(in terms of difference of global RMSE on two consecutive iterations) over time by toggling on/off method showError().
## The threshold is: 1e-05 .
## Algorithm that support autoConvergence: FunkSVD, wALS, BPR.
## Show delta error is OFF!
Default values are given in the above call to the method.
The method uses the global environment and a configuration will be the same for all three algorithms that require this kind of iteration.