{ } Raw JSON

bundles / scipy 1.18.0 / scipy / optimize / _basinhopping / BasinHoppingRunner

class

scipy.optimize._basinhopping:BasinHoppingRunner

source: /scipy/optimize/_basinhopping.py:42

Signature

class BasinHoppingRunner(x0, minimizer, step_taking, accept_tests, disp = False)

Members

Summary

This class implements the core of the basinhopping algorithm.

Extended Summary

x0

The starting coordinates.

minimizer

The local minimizer, with signature result = minimizer(x). The return value is an optimize.OptimizeResult object.

step_taking

This function displaces the coordinates randomly. Signature should be x_new = step_taking(x). Note that x may be modified in-place.

accept_tests

Each test is passed the kwargs f_new, x_new, f_old and x_old. These tests will be used to judge whether or not to accept the step. The acceptable return values are True, False, or "force accept". If any of the tests return False then the step is rejected. If "force accept", then this will override any other tests in order to accept the step. This can be used, for example, to forcefully escape from a local minimum that basinhopping is trapped in.

disp

Display status messages.

Aliases

  • scipy.optimize._basinhopping.BasinHoppingRunner