Index
Basinhopping.AcceptanceTest
Basinhopping.BasinhoppingOutcome
Basinhopping.BasinhoppingParams
Basinhopping.BasinhoppingParams
Basinhopping.BasinhoppingResult
Basinhopping.CompositeTest
Basinhopping.MetropolisTest
Basinhopping.MetropolisTest
Basinhopping.RandomDisplacement
Basinhopping.StepTaker
Basinhopping.Test
Base.minimum
Base.show
Basinhopping.apply_test
Basinhopping.apply_test
Basinhopping.apply_test
Basinhopping.basinhopping
Basinhopping.metropolis_criterion
Basinhopping.success_string
Basinhopping.take_step!
Basinhopping.take_step!
Basinhopping.update!
Basinhopping.update!
Optim.f_calls
Optim.g_calls
Optim.h_calls
Optim.minimizer
Reference
Basinhopping.AcceptanceTest
— TypeRepresents test indicating whether optimization result should be accepted
Basinhopping.BasinhoppingOutcome
— TypeBasinhopping algorithm outcomes
niter_completed
: Maximum number of local optimisatiosn reachedearly_stop
: Callback function requested an early stop to the algorithmsuccess_condition
: Same minimum found more than specified number of times
Basinhopping.BasinhoppingParams
— Typestruct BasinhoppingParams{T<:StepTaker,U<:AcceptanceTest,C<:Function}
Optional parameters to Basinhopping algorithm
Fields
niter::Int64
: Total number of local optimisations performed.step_taker::T
: Total number of local optimizations performed.test::U
: Test determining whether local optimization is accepted.callback::C
: Function to be called after each local optimization. Signature:(x, minimum, parameters_after_local_opt, minimum_after_local_opt, test_result) -> bool
. If this returnstrue
the algorithm is stopped.niter_success::Int64
: Stop if the global minimum candidate remains the same for this number of iterations.
Basinhopping.BasinhoppingParams
— Methodfunction BasinhoppingParams(;<keyword arguments>)
Keyword arguments
niter
: Default:20
.step_taker
: DefaultRandomDisplacement(0.5, Random.GLOBAL_RNG, 50, 0.5, 0.9)
.test
: Default:MetropolisTest(1.0, Random.GLOBAL_RNG)
.callback::Int64
: Default:(...) -> false
.niter_success::Int64
: Default:2
Basinhopping.BasinhoppingResult
— TypeBasinhopping algorithm result
Fields
minimization_result
: local optimization result identified as global minimumtotal_iterations::Int64
: total number of local optimizations performedf_calls::Int64
: total number of function evaluationsg_calls::Int64
: total number of gradient callsh_calls::Int64
: total number of Hessian evaluationsexit_code::BasinhoppingOutcome
: Result of algorithm (seeBasinhoppingOutcome
documentation)
Basinhopping.CompositeTest
— TypeGroup multiple tests together
Basinhopping.MetropolisTest
— TypeMetropolis acceptance test parameters
Basinhopping.MetropolisTest
— Typefunction MetropolisTest(T[, rng])
Create Metropolis acceptance test with temperature T = 1/beta
.
Basinhopping.RandomDisplacement
— TypeRandom displacement of parameters.
Fields
stepsize::Float64
: Size of random displacement.rng::RNG
: Source of pseudorandomness.interval::Int64
: total number of function evaluations.target_accept_rate::Float64
: Ratio between local minima being accepted and all local optimizations.factor::Float64
: Factor by which to adjust step size when updating.
Basinhopping.StepTaker
— TypeRepresents perturbation of parameters between local optimizations.
Basinhopping.Test
— TypeResult of applying acceptance test
accept
: Test passed, local minimum acceptedreject
: Test failed, local minimum rejectedforce
: Forced acceptance of local minimum
Base.minimum
— MethodReturns global minimum found by basinhopping
Base.show
— MethodShow global minimum found
Basinhopping.apply_test
— Methodfunction apply_test(test,
minimum_after_local_opt,
x_after_local_opt,
minimum,
x)
Apply acceptance test.
Arguments
optimizer
: an optimization routine; must be a callable accepting a single argument, the initial parameters for a local optimizationx0
: initial parameters for first local optimizationparameters
: optional parameters; seeBasinhoppingParams
Basinhopping.apply_test
— Methodfunction apply_test(test::CompositeTest,
minimum_after_local_opt,
x_after_local_opt,
minimum,
x)
Evaluates composite acceptace test; test is accepted either if all tests are accepted or if one test forces the acceptance by returning force
.
Basinhopping.apply_test
— Methodfunction apply_test(test::MetropolisTest,
minimum_after_local_opt,
x_after_local_opt,
minimum,
x)
Evaluates Metropolis acceptace test.
See also metropolis_criterion
Basinhopping.basinhopping
— Functionfunction basinhopping(optimizer, x0[, parameters])
Basinhopping optimization algorithm.
Arguments
optimizer
: an optimization routine; must be a callable accepting a single argument, the initial parameters for a local optimizationx0
: initial parameters for first local optimizationparameters
: optional parameters; seeBasinhoppingParams
Basinhopping.metropolis_criterion
— MethodEvaluates Metropolis criterion.
Basinhopping.success_string
— MethodReports on exit code of basinhopping
Basinhopping.take_step!
— Methodtake_step!(d::RandomDisplacement, x)
Random perturbation in every coordinate of x
.
Basinhopping.take_step!
— Methodtake_step!(d::StepTaker, x)
Perturbs parameters x
as specified by a step taker d
Basinhopping.update!
— Methodupdate!(d::RandomDisplacement, nstep, naccept)
Basinhopping.update!
— Methodupdate!(d::StepTaker, nstep, naccept)
Updates step taking routine.
Arguments
d::StepTaker
:nstep::Int
: Number of local optimizations performed so far.naccept::Int
: Number of local minima accepted so far.
Optim.f_calls
— MethodReturns total number of function evaluations
Optim.g_calls
— MethodReturns total number of gradient evaluations
Optim.h_calls
— MethodReturns total number of Hessian evaluations
Optim.minimizer
— MethodReturns parameters at which global minimum was found