GridOptimizer¶
- class hoomd.tune.GridOptimizer(n_bins: int = 5, n_rounds: int = 1, maximize: bool = True)¶
Bases:
Optimizer
Optimize by consistently narrowing the range where the extrema is.
The algorithm is as follows. Given a domain \(d = [a, b]\), \(d\) is broken up into
n_bins
subsequent bins. For the nextn_bins
calls, the optimizer tests the function value at each bin center. The next call does one of two things. If the number of rounds has reachedn_rounds
the optimization is done, and the center of the best bin is the solution. Otherwise, another round is performed where the bin’s extent is the new domain.Warning
Changing a tunables domain during usage of a
GridOptimizer
results in incorrect behavior.- Parameters:
- __eq__(other)¶
Test for equality.
- reset()¶
Reset all solving internals.
- solve_one(tunable)¶
Perform one step of optimization protocol.