embcol.optimizers.RandomGlobalOptimizer¶
- class embcol.optimizers.RandomGlobalOptimizer(problem, callback=(), cost_tol=1e-08, rng=None)[source]¶
Bases:
BaseGlobalOptimizerRandom global optimizer.
Search a global optimum by the random sampling.
- Parameters:
problem (
embcol.problem.Problem) – Optimization problem.callback (callable or sequence of callable, optional) – Function(s) called after each iteration. The signature of a function must be
(params, cost, state) -> None, whereparamsis a one-dimensional array of parameters of type numpy.ndarray,costis a cost value of type float, andstateis a dict object of str to float detailing an optimization state.cost_tol (
float, optional) – Convergence tolerance for the cost.rng (rng-like, optional) – Random number generator. If nothing is given, a generator is initialized nondeterministically.
Inherited methods
optimize([max_n_iters, resume])Run an optimization.