Returns list with relative variance over n.steps, absolute.threshold, last value,
and logical "stop", if conditions are met and training should stop.
The final stop decision is:
check.thresh | (check.rthresh & check.rvar)
if combine.relative.thresholds = "AND"
or
check.thresh | (check.rthresh | check.rvar)
if combine.relative.thresholds = "OR"
checkpoint.earlyStopping(x, absolute.threshold = NA,
relative.threshold = NA, minimize = TRUE,
relativeVariance.threshold = NA, n.steps = 10,
combine.relative.thresholds = "AND", min.steps = 50,
na.response = c("stop", "continue"), verbose = TRUE)
Float, vector: Input - this would normally be the loss at each iteration
Float: If set and the last value of x
is less than or equal to this
(if minimize = TRUE
) or greater than or equal to this (if minimize = FALSE
), then return
stop = TRUE
. See output under Value. Default = NA
Float: If set, checks if the relative change from the first to last value of x
exceeds this number. i.e. if set to .9 and minimize = TRUE
, if there is a 90% drop from x[1]
to
x[length(x)]
, then the function returns stop = TRUE
. If minimize = FALSE
, then checks if there
is a 90% increase, accordingly.
Logical: See absolute.threshold
. Default = TRUE
Float: If relative variance over last n.steps
is less than or equal to this,
return stop = TRUE
. See output under Value
Integer; > 1: Calculate relative variance over this many last values of x
String: "AND" or "OR": How to combine the criteria relative.threshold
and
relativeVariance.threshold
. Default = "AND", which means both must be TRUE to stop. The scenario is you might
want to check relastiveVariance threshold only after a certain amount of learning has taken place, which you
can't predict with min.steps
but would rather quantify with relative.threshold
.
Integer: Do not calculate relativeVariance unless x
is at least this length
String: "stop" or "continue": what should happen if the last value of x
is NA
Logical: If TRUE, print messages to output
List with the following items:
Float: Last value of x
Float: relative variance of last n.steps
Logical: TRUE, if absolute threshold was reached
Logical: TRUE, if relative variance threshold was reached
Logical: TRUE, if either criterion was met - absolute threshold or relativeVariance.threshold