pybop.optimisers._irprop_plus#

Classes#

IRPropPlusImpl

The iRprop+ algorithm adjusts step sizes based on the sign of the gradient

Module Contents#

class pybop.optimisers._irprop_plus.IRPropPlusImpl(x0: numpy.ndarray, sigma0: list[float] | None, boundaries: pints.Boundaries | None)[source]#

Bases: pints.Optimiser

The iRprop+ algorithm adjusts step sizes based on the sign of the gradient in each dimension, increasing step sizes when the sign remains consistent and decreasing when the sign changes. This implementation includes weight (parameter) backtracking that reverts the previous step in the event of a gradient sign changing.

References: - [1] Igel and Hüsken (2003): Empirical Evaluation of Improved Rprop Algorithms. - [2] Riedmiller and Braun (1993): A Direct Adaptive Method for Faster Backpropagation. - [3] Igel and Husk (2003): Improving the Rprop Learning Algorithm.

Parameters:
  • x0 (array-like) – Initial starting point for the optimisation.

  • sigma0 (float or array-like, optional) – Initial step size(s). If a scalar is provided, it is applied to all dimensions. Default is 0.05.

  • boundaries (pints.Boundaries, optional) – Boundary constraints for the optimisation. If None, no boundaries are applied.

eta_min[source]#

Factor by which the step size is reduced when the gradient sign changes. Default is 0.5.

Type:

float

eta_max[source]#

Factor by which the step size is increased when the gradient sign remains consistent. Default is 1.2.

Type:

float

step_min[source]#

Minimum allowable step size. Default is 1e-3 * min(sigma0).

Type:

float

step_max[source]#

Maximum allowable step size. Default is None (unlimited).

Type:

float or None

ask()[source]#

Proposes the next point for evaluation.

Returns:

A list containing the proposed point.

Return type:

list

f_best()[source]#

Returns the best function value found so far.

name()[source]#

Returns the name of the optimiser.

needs_sensitivities()[source]#

Indicates that this optimiser requires gradient information.

running()[source]#

Returns the state of the optimiser

tell(reply)[source]#

Updates the optimiser with the function value and gradient at the proposed point.

Parameters:

reply (list) – A list containing a tuple of (function value, gradient) at the proposed point.

Raises:

RuntimeError – If ask() was not called before tell().

x_best()[source]#

Returns the best position found so far.

_boundaries[source]#
_f_best[source]#
_f_current[source]#
_gradient_previous = None[source]#
_proposed[source]#
_ready_for_tell = False[source]#
_running = False[source]#
_step_sizes[source]#
_update_previous[source]#
_x_best[source]#
_x_current[source]#
eta_max = 1.2[source]#
eta_min = 0.5[source]#
step_max: float | None = None[source]#
step_min[source]#