3.12.1. Optimization History¶
-
class
History
(file=None, start=0)¶ History helper class for logging of
x
,fx
during an optimization and processing. Can be used to load saved history files produced by theLogger
.-
add
(x: Sequence[float], fx: float)¶ Add a new tuple of (x, f(x)) to the history. This is done automatically by the
Logger
class.
-
__len__
()¶ Get the total number of history entries
-
__iter__
()¶ Iterate over history entries
-
write
(fpath)¶ Write all history entries to fpath. The per line write order is
index fx x
-
load
(fpath)¶ Load entries from fpath.
-