StoppingRule
The StoppingRule trait provides stopping rules to terminating the iterative steps in an optimization early.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Members list
Value members
Concrete methods
Stop when too many steps have the cost measure (e.g., sse) increasing. Signal a stopping condition by returning the best parameter vector, else null.
Stop when too many steps have the cost measure (e.g., sse) increasing. Signal a stopping condition by returning the best parameter vector, else null.
Value parameters
- b
-
the current value of the parameter vector
- sse
-
the current value of cost measure (e.g., sum of squared errors)
Attributes
Stop when too many steps have the cost measure (e.g., sse) increasing. Signal a stopping condition by returning the best parameter vector, else null.
Stop when too many steps have the cost measure (e.g., sse) increasing. Signal a stopping condition by returning the best parameter vector, else null.
Value parameters
- b
-
the current parameter value (weights and biases)
- sse
-
the current value of cost measure (e.g., sum of squared errors)
Attributes
Stop when too many steps have the cost measure (e.g., loss) increasing. Signal a stopping condition by returning the best list of parameters, else null.
Stop when too many steps have the cost measure (e.g., loss) increasing. Signal a stopping condition by returning the best list of parameters, else null.
Value parameters
- loss
-
the current loss value.
- params
-
the current list of
Variablparameters (e.g., weights, biases). - upLimit
-
the maximum number of consecutive steps allowed without improvement.
Attributes
- Returns
-
A tuple containing (best_params, best_loss) if patience is exceeded, else (null, best_loss).
Early stopping with patience. If the loss does not improve (by more than EPSILON) for patience consecutive steps, signal a stopping condition by returning the best parameters and loss.
Early stopping with patience. If the loss does not improve (by more than EPSILON) for patience consecutive steps, signal a stopping condition by returning the best parameters and loss.
Value parameters
- loss
-
the current loss value.
- params
-
the current list of
Variablparameters (e.g., weights, biases). - patience
-
the number of epochs to waitLimit without improvement.
Attributes
- Returns
-
A tuple containing (best_params, best_loss) if patience is exceeded, else (null, best_loss).