Basin hopping是什么全局优化算法?

来源:互联网 发布:js截取小数点后两位 编辑:程序博客网 时间:2024/05/22 00:27

6
 
点击打开链接
Quora User
Votes by Justin Rising, Will Beauchamp, Alistair Muldal, Slaven Glumac, and 1 more.
Basin-hopping is a stochastic algorithm which attempts to find the global minimum of a smooth scalar function of one or more variables. The algorithm in its current form was described by David Wales and Jonathan Doye
The algorithm is iterative with each cycle composed of the following features
  1. random perturbation of the coordinates
  2. local minimization
  3. accept or reject the new coordinates based on the minimized function value
The acceptance test used here is the Metropolis criterion of standard Monte Carlo algorithms, although there are many other possibilities. This global minimization method has been shown to be extremely efficient for a wide variety of problems in physics and chemistry. It is particularly useful when the function has many minima separated by large barriers. 
For stochastic global optimization there is no way to determine if the true global minimum has actually been found. Instead, as a consistency check, the algorithm can be run from a number of different random starting points to ensure the lowest minimum found in each example has converged to the global minimum. For this reason basinhopping will by default simply run for the number of iterations niter and return the lowest minimum found. It is left to the user to ensure that this is in fact the global minimum.

  • Choosing stepsize: This is a crucial parameter in basinhopping and depends on the problem being solved. Ideally it should be comparable to the typical separation between local minima of the function being optimized. Basinhopping will, by default, adjust stepsize to find an optimal value, but this may take many iterations. You will get quicker results if you set a sensible value for stepsize.
  • Choosing T: The parameter T is the temperature used in the metropolis criterion. Basin hopping steps are accepted with probability 1 if func(xnew) < func(xold), or otherwise with probability:
exp( -(func(xnew) - func(xold)) / T )
So, for best results, T should to be comparable to the typical difference in function value between between local minima.

SciPy has an inbuilt package for this algorithm:

scipy.optimize.basinhopping(funcx0niter=100T=1.0stepsize=0.5,minimizer_kwargs=Nonetake_step=None,accept_test=Nonecallback=None,interval=50disp=Falseniter_success=None)
Find the global minimum of a function using the basin-hopping algorithm

Parameters :
func : callable f(x, *args)
Function to be optimized. args can be passed as an optional item in the dict minimizer_kwargs
x0 : ndarray
Initial guess.
niter : integer, optional
The number of basin hopping iterations
T : float, optional
The “temperature” parameter for the accept or reject criterion. Higher “temperatures” mean that larger jumps in function value will be accepted. For best results T should be comparable to the separation (in function value) between local minima.
stepsize : float, optional
initial step size for use in the random displacement.
minimizer_kwargs : dict, optional
Extra keyword arguments to be passed to the minimizer scipy.optimize.minimize() Some important options could be:
method : str
The minimization method (e.g. "L-BFGS-B")
args : tuple
Extra arguments passed to the objective function (func) and its derivatives (Jacobian, Hessian).
take_step : callable take_step(x), optional
Replace the default step taking routine with this routine. The default step taking routine is a random displacement of the coordinates, but other step taking algorithms may be better for some systems.take_step can optionally have the attribute take_step.stepsize. If this attribute exists, thenbasinhopping will adjust take_step.stepsize in order to try to optimize the global minimum search.
accept_test : callable, accept_test(f_new=f_new, x_new=x_new, f_old=fold,x_old=x_old), optional
Define a test which will be used to judge whether or not to accept the step. This will be used in addition to the Metropolis test based on “temperature” T. The acceptable return values are True,False, or "force accept". If the latter, 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 thatbasinhopping is trapped in.
callback : callable, callback(x, f, accept), optional
A callback function which will be called for all minimum found. x and f are the coordinates and function value of the trial minima, and accept is whether or not that minima was accepted. This can be used, for example, to save the lowest N minima found. Also, callback can be used to specify a user defined stop criterion by optionally returning True to stop the basinhoppingroutine.
interval : integer, optional
interval for how often to update the stepsize
disp : bool, optional
Set to True to print status messages
niter_success : integer, optional
Stop the run if the global minimum candidate remains the same for this number of iterations.
Returns :
res : Result
The optimization result represented as a Result object. Important attributes are: x the solution array, fun the value of the function at the solution, and message which describes the cause of the termination. See Result for a description of other attributes.

Source:http://docs.scipy.org/doc/scipy-...
  
Upvote • Comment • Written 20 Jul, 2013
Quora User

http://www.quora.com/Mathematical-Optimization/What-is-the-basin-hopping-algorithm



6
 
Quora User
Votes by Justin Rising, Will Beauchamp, Alistair Muldal, Slaven Glumac, and 1 more.
Basin-hopping is a stochastic algorithm which attempts to find the global minimum of a smooth scalar function of one or more variables. The algorithm in its current form was described by David Wales and Jonathan Doye
The algorithm is iterative with each cycle composed of the following features
  1. random perturbation of the coordinates
  2. local minimization
  3. accept or reject the new coordinates based on the minimized function value
The acceptance test used here is the Metropolis criterion of standard Monte Carlo algorithms, although there are many other possibilities. This global minimization method has been shown to be extremely efficient for a wide variety of problems in physics and chemistry. It is particularly useful when the function has many minima separated by large barriers. 
For stochastic global optimization there is no way to determine if the true global minimum has actually been found. Instead, as a consistency check, the algorithm can be run from a number of different random starting points to ensure the lowest minimum found in each example has converged to the global minimum. For this reason basinhopping will by default simply run for the number of iterations niter and return the lowest minimum found. It is left to the user to ensure that this is in fact the global minimum.

  • Choosing stepsize: This is a crucial parameter in basinhopping and depends on the problem being solved. Ideally it should be comparable to the typical separation between local minima of the function being optimized. Basinhopping will, by default, adjust stepsize to find an optimal value, but this may take many iterations. You will get quicker results if you set a sensible value for stepsize.
  • Choosing T: The parameter T is the temperature used in the metropolis criterion. Basin hopping steps are accepted with probability 1 if func(xnew) < func(xold), or otherwise with probability:
exp( -(func(xnew) - func(xold)) / T )
So, for best results, T should to be comparable to the typical difference in function value between between local minima.

SciPy has an inbuilt package for this algorithm:

scipy.optimize.basinhopping(funcx0niter=100T=1.0stepsize=0.5,minimizer_kwargs=Nonetake_step=None,accept_test=Nonecallback=None,interval=50disp=Falseniter_success=None)
Find the global minimum of a function using the basin-hopping algorithm

Parameters :
func : callable f(x, *args)
Function to be optimized. args can be passed as an optional item in the dict minimizer_kwargs
x0 : ndarray
Initial guess.
niter : integer, optional
The number of basin hopping iterations
T : float, optional
The “temperature” parameter for the accept or reject criterion. Higher “temperatures” mean that larger jumps in function value will be accepted. For best results T should be comparable to the separation (in function value) between local minima.
stepsize : float, optional
initial step size for use in the random displacement.
minimizer_kwargs : dict, optional
Extra keyword arguments to be passed to the minimizer scipy.optimize.minimize() Some important options could be:
method : str
The minimization method (e.g. "L-BFGS-B")
args : tuple
Extra arguments passed to the objective function (func) and its derivatives (Jacobian, Hessian).
take_step : callable take_step(x), optional
Replace the default step taking routine with this routine. The default step taking routine is a random displacement of the coordinates, but other step taking algorithms may be better for some systems.take_step can optionally have the attribute take_step.stepsize. If this attribute exists, thenbasinhopping will adjust take_step.stepsize in order to try to optimize the global minimum search.
accept_test : callable, accept_test(f_new=f_new, x_new=x_new, f_old=fold,x_old=x_old), optional
Define a test which will be used to judge whether or not to accept the step. This will be used in addition to the Metropolis test based on “temperature” T. The acceptable return values are True,False, or "force accept". If the latter, 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 thatbasinhopping is trapped in.
callback : callable, callback(x, f, accept), optional
A callback function which will be called for all minimum found. x and f are the coordinates and function value of the trial minima, and accept is whether or not that minima was accepted. This can be used, for example, to save the lowest N minima found. Also, callback can be used to specify a user defined stop criterion by optionally returning True to stop the basinhoppingroutine.
interval : integer, optional
interval for how often to update the stepsize
disp : bool, optional
Set to True to print status messages
niter_success : integer, optional
Stop the run if the global minimum candidate remains the same for this number of iterations.
Returns :
res : Result
The optimization result represented as a Result object. Important attributes are: x the solution array, fun the value of the function at the solution, and message which describes the cause of the termination. See Result for a description of other attributes.

Source:http://docs.scipy.org/doc/scipy-...
  
Upvote • Comment • Written 20 Jul, 2013
Quora User


6
 
Quora User
Votes by Justin Rising, Will Beauchamp, Alistair Muldal, Slaven Glumac, and 1 more.
Basin-hopping is a stochastic algorithm which attempts to find the global minimum of a smooth scalar function of one or more variables. The algorithm in its current form was described by David Wales and Jonathan Doye
The algorithm is iterative with each cycle composed of the following features
  1. random perturbation of the coordinates
  2. local minimization
  3. accept or reject the new coordinates based on the minimized function value
The acceptance test used here is the Metropolis criterion of standard Monte Carlo algorithms, although there are many other possibilities. This global minimization method has been shown to be extremely efficient for a wide variety of problems in physics and chemistry. It is particularly useful when the function has many minima separated by large barriers. 
For stochastic global optimization there is no way to determine if the true global minimum has actually been found. Instead, as a consistency check, the algorithm can be run from a number of different random starting points to ensure the lowest minimum found in each example has converged to the global minimum. For this reason basinhopping will by default simply run for the number of iterations niter and return the lowest minimum found. It is left to the user to ensure that this is in fact the global minimum.

  • Choosing stepsize: This is a crucial parameter in basinhopping and depends on the problem being solved. Ideally it should be comparable to the typical separation between local minima of the function being optimized. Basinhopping will, by default, adjust stepsize to find an optimal value, but this may take many iterations. You will get quicker results if you set a sensible value for stepsize.
  • Choosing T: The parameter T is the temperature used in the metropolis criterion. Basin hopping steps are accepted with probability 1 if func(xnew) < func(xold), or otherwise with probability:
exp( -(func(xnew) - func(xold)) / T )
So, for best results, T should to be comparable to the typical difference in function value between between local minima.

SciPy has an inbuilt package for this algorithm:

scipy.optimize.basinhopping(funcx0niter=100T=1.0stepsize=0.5,minimizer_kwargs=Nonetake_step=None,accept_test=Nonecallback=None,interval=50disp=Falseniter_success=None)
Find the global minimum of a function using the basin-hopping algorithm

Parameters :
func : callable f(x, *args)
Function to be optimized. args can be passed as an optional item in the dict minimizer_kwargs
x0 : ndarray
Initial guess.
niter : integer, optional
The number of basin hopping iterations
T : float, optional
The “temperature” parameter for the accept or reject criterion. Higher “temperatures” mean that larger jumps in function value will be accepted. For best results T should be comparable to the separation (in function value) between local minima.
stepsize : float, optional
initial step size for use in the random displacement.
minimizer_kwargs : dict, optional
Extra keyword arguments to be passed to the minimizer scipy.optimize.minimize() Some important options could be:
method : str
The minimization method (e.g. "L-BFGS-B")
args : tuple
Extra arguments passed to the objective function (func) and its derivatives (Jacobian, Hessian).
take_step : callable take_step(x), optional
Replace the default step taking routine with this routine. The default step taking routine is a random displacement of the coordinates, but other step taking algorithms may be better for some systems.take_step can optionally have the attribute take_step.stepsize. If this attribute exists, thenbasinhopping will adjust take_step.stepsize in order to try to optimize the global minimum search.
accept_test : callable, accept_test(f_new=f_new, x_new=x_new, f_old=fold,x_old=x_old), optional
Define a test which will be used to judge whether or not to accept the step. This will be used in addition to the Metropolis test based on “temperature” T. The acceptable return values are True,False, or "force accept". If the latter, 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 thatbasinhopping is trapped in.
callback : callable, callback(x, f, accept), optional
A callback function which will be called for all minimum found. x and f are the coordinates and function value of the trial minima, and accept is whether or not that minima was accepted. This can be used, for example, to save the lowest N minima found. Also, callback can be used to specify a user defined stop criterion by optionally returning True to stop the basinhoppingroutine.
interval : integer, optional
interval for how often to update the stepsize
disp : bool, optional
Set to True to print status messages
niter_success : integer, optional
Stop the run if the global minimum candidate remains the same for this number of iterations.
Returns :
res : Result
The optimization result represented as a Result object. Important attributes are: x the solution array, fun the value of the function at the solution, and message which describes the cause of the termination. See Result for a description of other attributes.

Source:http://docs.scipy.org/doc/scipy-...
  
Upvote • Comment • Written 20 Jul, 2013
Quora User
1 0