seisflows.plugins.line_search.backtrack
Backtracking line search class plugin to be used with an L-BFGS optimization
https://en.wikipedia.org/wiki/Backtracking_line_search
Module Contents
Classes
[line_search.backtrack] Backtracking line search assumes the |
- class seisflows.plugins.line_search.backtrack.Backtrack(step_count_max, step_len_max, path=None)
Bases:
seisflows.plugins.line_search.bracket.Bracket
[line_search.backtrack] Backtracking line search assumes the gradient is well scaled from the L-BFGS optimization algorithm, such that a unit step length (1) will provide a decrease in misfit. If misfit does not decrease, the backtracking step count follows a parabolic backtrack from 1 -> 0 in search of a decreased misfit. If the backtracked value becomes too small the backtracking line search defaults to a Bracketing line search.
- Variables Descriptions:
x: list of step lenths from current line search f: correpsonding list of function values m: number of step lengths in current line search n: number of model updates in optimization problem gtg: dot product of gradient with itself gtp: dot product of gradient and search direction
- Status codes
status == 1 : PASS, line search finished status == 0 : TRY/RETRY, attempt line search w/ new step length status == -1 : FAIL, line search exceeds internal criteria
- calculate_step_length()
Determines step length and search status. Defaults to ‘Bracket’ing line search during the first evaluation (waiting for the L-BFGS to scale properly).
Note
Search history variable descriptions: x: list of step lenths from current line search f: correpsonding list of function values m: number of step lengths in current line search n: number of model updates in optimization problem gtg: dot product of gradient with itself gtp: dot product of gradient and search direction
- Return type
tuple (float, str)
- Returns
(alpha==calculated step length, status==how to treat the next step count evaluation)