View source: R/checkpoint_earlystop.R
checkpoint_earlystop | R Documentation |
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_earlystop(
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
)
x |
Float, vector: Input - this would normally be the loss at each iteration |
absolute.threshold |
Float: If set and the last value of |
relative.threshold |
Float: If set, checks if the relative change from the first to last value of |
minimize |
Logical: See |
relativeVariance.threshold |
Float: If relative variance over last |
n.steps |
Integer; > 1: Calculate relative variance over this many last values of |
combine.relative.thresholds |
Character: "AND" or "OR": How to combine the criteria |
min.steps |
Integer: Do not calculate relativeVariance unless |
na.response |
Character: "stop" or "continue": what should happen if the last value of |
verbose |
Logical: If TRUE, print messages to console |
List with the following items:
last.value
Float: Last value of x
relativeVariance
Float: relative variance of last n.steps
check.thresh
Logical: TRUE, if absolute threshold was reached
check.rvar
Logical: TRUE, if relative variance threshold was reached
stop
Logical: TRUE, if either criterion was met - absolute threshold or relativeVariance.threshold
E.D. Gennatas
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.