estimator.util.early_abort_range#
- class estimator.util.early_abort_range(start, stop=<MagicMock id='139885972013696'>, step=1, smallerf=<function early_abort_range.<lambda>>, suppress_bounds_warning=False, log_level=5)[source]#
An iterator context for finding a local minimum using linear search.
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, optional)
step – step size
smallerf – a function to decide if
lhs
is smaller thanrhs
.suppress_bounds_warning – do not warn if a boundary is picked as optimal
- __call__(**kwargs)#
Call self as a function.
Methods
__init__
(start[, stop, step, smallerf, ...])Create a fresh local minimum search context.
update
(res)Attributes