Skip to content

optimtool-2.5.2

Compare
Choose a tag to compare
@linjing-lab linjing-lab released this 19 Oct 09:59
· 68 commits to master since this release

Fixed Bug:

  • add assertion in _search/ZhangHanger for users to adjust default parameters by AssertionError with alpha > 0.

New Example:

import optimtool.unconstrain as ou
from optimtool.base import sp
x = sp.symbols("x1:5")
f = 100 * (x[1] - x[0]**2)**2 + \
    (1 - x[0])**2 + \
    100 * (x[3] - x[2]**2)**2 + \
    (1 - x[2])**2
x_0 = (-1.2, 1, -1.2, 1)
barzilar_borwein = ou.gradient_descent.barzilar_borwein
barzilar_borwein(f, x, x_0, verbose=True, method="ZhangHanger", c1=0.8, beta=0.8, eta=0.6)

see tests and examples for fine-tuning default parameters of more algorithms.