optimize.tests.test_linesearch

Tests for line search routines

Module Contents

Classes

TestLineSearch()

Functions

assert_wolfe(s,phi,derphi,c1=0.0001,c2=0.9,err_msg=”“) Check that strong Wolfe conditions apply
assert_armijo(s,phi,c1=0.0001,err_msg=”“) Check that Armijo condition applies
assert_line_wolfe(x,p,s,f,fprime,**kw)
assert_line_armijo(x,p,s,f,**kw)
assert_fp_equal(x,y,err_msg=”“,nulp=50) Assert two arrays are equal, up to some floating-point rounding error
assert_wolfe(s, phi, derphi, c1=0.0001, c2=0.9, err_msg="")

Check that strong Wolfe conditions apply

assert_armijo(s, phi, c1=0.0001, err_msg="")

Check that Armijo condition applies

assert_line_wolfe(x, p, s, f, fprime, **kw)
assert_line_armijo(x, p, s, f, **kw)
assert_fp_equal(x, y, err_msg="", nulp=50)

Assert two arrays are equal, up to some floating-point rounding error

class TestLineSearch
_scalar_func_1(s)
_scalar_func_2(s)
_scalar_func_3(s)
_line_func_1(x)
_line_func_2(x)
setup_method()
scalar_iter()
line_iter()
test_scalar_search_wolfe1()
test_scalar_search_wolfe2()
test_scalar_search_armijo()
test_line_search_wolfe1()
test_line_search_wolfe2()
test_line_search_wolfe2_bounds()
test_line_search_armijo()
test_armijo_terminate_1()
test_wolfe_terminate()