简体   繁体   中英

Meaning of 'minimization_failures' when using scipy.optimize.basinhopping?

I am trying to use scipy.optimize.basinhopping with a function b_log(x) at point x=10 . I do not understand the meaning of "minimization_failures" below. Can anyone explain?

 In [144]: scipy.optimize.basinhopping(b_log,10)
    Out[144]:
                      nfev: 6969
     minimization_failures: 101
                       fun: 420
                         x: array([10])
                   message: ['requested number of basinhopping iterations completed successfully']
                      njev: 1919
                       nit: 100

From the original source :

# do a local minimization
minres = self.minimizer(x_after_step) 
x_after_quench = minres.x
energy_after_quench = minres.fun
if not minres.success:
    self.res.minimization_failures += 1 
    if self.disp:
        print("warning: basinhopping: local minimization failure")

So, minimization_failures means exactly what its name says: The number of times a minimization could not be done during the monte-carlo-step.

Edit: Have a look at this for some explanation of the method. I think u may need to provide the additional arguments to the function (eg T and minimizer_kwargs).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM