pybop.optimisers.scipy_optimisers#
Classes#
Adapter for SciPy's differential_evolution function for global optimisation, useful for problems |
|
Adapter for various scalar minimisation algorithms implemented in SciPy, allowing fine-tuning |
Module Contents#
- class pybop.optimisers.scipy_optimisers.SciPyDifferentialEvolution(problem: pybop.problems.problem.Problem, options: SciPyDifferentialEvolutionOptions | None = None)[source]#
Bases:
BaseSciPyOptimiserAdapter for SciPy’s differential_evolution function for global optimisation, useful for problems involving continuous parameters and potentially multiple local minima.
- Parameters:
problem (pybop.Problem) – The problem to optimise.
options (SciPyDifferentialEvolutionOptions, optional) – Options for the SciPy differential evolution method (default: None).
See also
scipy.optimize.differential_evolutionThe SciPy method this class is based on.
Notes
Differential Evolution is a stochastic population based method that is useful for global optimisation problems. At each pass through the population the algorithm mutates each candidate solution by mixing with other candidate solutions to create a trial candidate. The fitness of all candidates is then evaluated and for each candidate if the trial candidate is an improvement, it takes its place in the population for the next iteration.
- _run()[source]#
Executes the optimisation process using SciPy’s differential_evolution function.
- Returns:
result – The result of the optimisation including the optimised parameter values and cost.
- Return type:
scipy.optimize.OptimizeResult
- static default_options() SciPyDifferentialEvolutionOptions[source]#
Returns the default options for the optimiser.
- property name#
Provides the name of the optimisation strategy.
- class pybop.optimisers.scipy_optimisers.SciPyMinimize(problem: pybop.problems.problem.Problem, options: SciPyMinimizeOptions | None = None)[source]#
Bases:
BaseSciPyOptimiserAdapter for various scalar minimisation algorithms implemented in SciPy, allowing fine-tuning of the optimisation process through method selection and option configuration.
- Parameters:
problem (pybop.Problem) – The problem to optimise.
options (ScipyMinizeOptions, optional) – Options for the SciPy minimize method (default: None).
See also
scipy.optimize.minimizeThe SciPy method this class is based on.
Notes
Different optimisation methods may support different options. Consult SciPy’s documentation for method-specific options and constraints.
- _run()[source]#
Executes the optimisation process using SciPy’s minimize function.
- Returns:
result – The result of the optimisation including the optimised parameter values and cost.
- Return type:
scipy.optimize.OptimizeResult
- static default_options() SciPyMinimizeOptions[source]#
Returns the default options for the optimiser.
- property name#
Provides the name of the optimisation strategy.