estimator.util.local_minimum_base

estimator.util.local_minimum_base#

class estimator.util.local_minimum_base(start, stop, smallerf=<function local_minimum_base.<lambda>>, suppress_bounds_warning=False, log_level=5)[source]#

An iterator context for finding a local minimum using binary search.

We use the immediate neighborhood of a point to decide the next direction to go into (gradient descent style), so the algorithm is not plain binary search (see update() function.)

Note

We combine an iterator and a context to give the caller access to the result.

Create a fresh local minimum search context.

Parameters:
  • start – starting point

  • stop – end point (exclusive)

  • smallerf – a function to decide if lhs is smaller than rhs.

  • suppress_bounds_warning – do not warn if a boundary is picked as optimal

__call__(**kwargs)#

Call self as a function.

Methods

__init__(start, stop[, smallerf, ...])

Create a fresh local minimum search context.

update(res)

TESTS:

Attributes

x

y