Bespoke, from scratch, implementation of Armijo-Wolfe inexact line search technique to find step length for gradient descent optimisation. The library alternative is scipy.optimize.line_search
Example inputs provided to program:
- roll = 'M21AI619'
- R = last 2 digit of roll dynamically obtained
- FX = (x1 − R)^2 + (x2 − 2x1)^2
- delFX = dynamically calculated from FX
- epsilon = 10^-3
- alpha_1 = 1.0
- r = 0.5
- beta_1 = 10^-4
- beta_2 = 0.9
- X0 = [R+3,2R-2]
- D = dynamically calculated from delFX
- k = 1
Example output of program:
- F(x+alpha*dK): [18.99935447 37.99813236]
- Alpha (step length): 0.125
- Dk (descent direction): [-0.00101529 0.00115317]
- K (number of iterations): 323