UnconstrainedSteepestAscentSetHillClimber#
- class pybrops.opt.algo.UnconstrainedSteepestAscentSetHillClimber.UnconstrainedSteepestAscentSetHillClimber(rng=RandomState(MT19937) at 0x7F8D0DF4C840, **kwargs)[source]#
Bases:
UnconstrainedOptimizationAlgorithm
Class implementing a steepest ascent hill climber algorithm adapted for subset selection optimization. The search space is discrete and nominal in nature.
Constructor for a steepest ascent set hill-climber.
- Parameters:
rng (numpy.random.Generator, numpy.random.RandomState) – Random number generator.
kwargs (dict) – Additional keyword arguments.
Methods
Optimize an objective function.
optimize_vec
Attributes
Random number generator source.
- optimize(objfn, k, sspace, objfn_wt, **kwargs)[source]#
Optimize an objective function.
- Parameters:
objfn (callable) – Objective function which to optimize.
k (int) – Number of decision variables in the search space. A vector is formed as sspace^k
sspace (numpy.ndarray) – Search space that the OptimizationAlgorithm searches in.
objfn_wt (numpy.ndarray) – Weight(s) applied to output(s) from the objfn.
kwargs (dict) – Additional keyword arguments
- Returns:
out – A tuple of length 3 (soln, decn, misc)
- Return type:
tuple
- property rng: Generator | RandomState#
Random number generator source.