The function documented here implement stopping/convergence criteria commonly used in NMF algorithms.
nmf.stop.iteration generates a function that
implements the stopping criterion that limits the number
of iterations to a maximum of n), i.e. that
returns TRUE if i>=n, FALSE
otherwise.
nmf.stop.threshold generates a function that
implements the stopping criterion that stops when a given
stationarity threshold is achieved by successive
iterations. The returned function is identical to
nmf.stop.stationary, but with the default
threshold set to threshold.
More precisely, the objective function is computed over
n successive iterations (specified in argument
check.niter), every check.interval
iterations. The criterion stops when the absolute
difference between the maximum and the minimum objective
values over these iterations is lower than a given
threshold \alpha (specified in
stationary.th):
nmf.stop.connectivity implements the stopping
criterion that is based on the stationarity of the
connectivity matrix.
NMFStop(s, check = TRUE) nmf.stop.iteration(n) nmf.stop.threshold(threshold) nmf.stop.stationary(object, i, y, x, stationary.th = .Machine$double.eps, check.interval = 5 * check.niter, check.niter = 10L, ...) nmf.stop.connectivity(object, i, y, x, stopconv = 40, check.interval = 10, ...)
objective, which computes the objective
value between x and y.a function that can be passed to argument .stop of
function nmf, which is typically used when
the algorith is implemented as an iterative strategy.
a function that can be used as a stopping criterion for
NMF algorithms defined as
NMFStrategyIterative-class objects. That
is a function with arguments (strategy, i, target,
data, ...) that returns TRUE if the stopping
criterion is satisfied -- which in turn stops the
iterative process, and FALSE otherwise.
NMFStop acts as a factory method that creates
stopping criterion functions from different types of
values, which are subsequently used by
NMFStrategyIterative-class objects to
determine when to stop their iterative process.
NMFStop can take the following values:
nmf.stop.iteration;
nmf.stop.threshold; | [max( D(i- N_s + 1), ..., D(i) ) - min( D(i-
N_s + 1), ..., D(i) )] / n | <= alpha