pybop.optimisers._random_search#
Classes#
Random Search (RS) optimisation algorithm. |
Module Contents#
- class pybop.optimisers._random_search.RandomSearchImpl(x0: numpy.ndarray, sigma0: list[float] | None, boundaries: pints.Boundaries | None)[source]#
Bases:
pints.PopulationBasedOptimiserRandom Search (RS) optimisation algorithm. This algorithm explores the parameter space by randomly sampling points.
The algorithm does the following: 1. Initialise a population of solutions. 2. At each iteration, generate n number of random positions within boundaries. 3. Evaluate the quality/fitness of the positions. 4. Replace the best position with improved position if found.
- Parameters:
population_size – Number of solutions to evaluate per iteration.
optional – Number of solutions to evaluate per iteration.
References: The Random Search algorithm implemented in this work is based on principles outlined in “Introduction to Stochastic Search and Optimization: Estimation, Simulation, and Control” by Spall, J. C. (2003).
The implementation inherits from the PINTS PopulationOptimiser.
- _suggested_population_size()[source]#
Returns a suggested population size based on the dimension of the parameter space.
- tell(replies)[source]#
Receives a list of cost function values from points previously specified by self.ask(), and updates the optimiser state accordingly.
- _dim#
- _f_best#
- _lower = None#
- _ready_for_tell = False#
- _running = False#
- _upper = None#
- _x_best#