Package: hbayes
Bayesian OptimizationAn extended implementation of Bayesian Optimization.This is a forked project based onfmfn/BayesianOptimization v1.2.0. Most of the usage and features from the original repository will be kept for a long time.InstallationYou can simply install it withpipcommand line from the official PyPI site.pipinstallhbayesFor more information about installation, you can refer toInstallation.DocumentationThe detailed documentation are hosted onhttps://hansbug.github.io/hbayes/main/index.html.Only english version is provided now, the chinese documentation is still under development.Quick StartA painless examplefromhbayesimportBayesianOptimizationdefblack_box_function(x,y):"""Function with unknown internals we wish to maximize.This is just serving as an example, for all intents andpurposes think of the internals of this function, i.e.: the processwhich generates its output values, as unknown."""return-x**2-(y-1)**2+1# Bounded region of parameter spacepbounds={'x':(2,4),'y':(-3,3)}optimizer=BayesianOptimization(f=black_box_function,pbounds=pbounds,random_state=1,verbose=2,)optimizer.maximize(init_points=10,n_iter=25,)print(optimizer.max)The output should be|   iter    |  target   |     x     |     y     |
-------------------------------------------------
|  1        | -7.135    |  2.834    |  1.322    |
|  2        | -7.78     |  2.0      | -1.186    |
|  3        | -16.13    |  2.294    | -2.446    |
|  4        | -8.341    |  2.373    | -0.9266   |
|  5        | -7.392    |  2.794    |  0.2329   |
|  6        | -7.069    |  2.838    |  1.111    |
|  7        | -6.412    |  2.409    |  2.269    |
|  8        | -3.223    |  2.055    |  1.023    |
|  9        | -7.455    |  2.835    |  0.3521   |
|  10       | -12.11    |  2.281    | -1.811    |
|  11       | -7.0      |  2.0      |  3.0      |
|  12       | -19.0     |  4.0      |  3.0      |
|  13       | -3.383    |  2.0      |  0.3812   |
|  14       | -3.43     |  2.0      |  1.656    |
|  15       | -3.035    |  2.0      |  0.8129   |
|  16       | -17.03    |  4.0      | -0.4244   |
|  17       | -3.012    |  2.0      |  1.109    |
|  18       | -3.0      |  2.0      |  0.9813   |
|  19       | -3.0      |  2.0      |  0.9911   |
|  20       | -3.0      |  2.0      |  0.994    |
|  21       | -3.0      |  2.0      |  0.9957   |
|  22       | -3.0      |  2.0      |  0.9971   |
|  23       | -3.0      |  2.0      |  0.9994   |
|  24       | -3.0      |  2.0      |  1.004    |
|  25       | -3.0      |  2.0      |  0.978    |
|  26       | -3.001    |  2.0      |  1.024    |
|  27       | -3.001    |  2.0      |  0.9735   |
|  28       | -3.001    |  2.0      |  1.024    |
|  29       | -3.001    |  2.0      |  0.9729   |
|  30       | -3.001    |  2.0      |  1.024    |
|  31       | -3.0      |  2.0      |  1.021    |
|  32       | -3.001    |  2.0      |  0.9709   |
|  33       | -3.001    |  2.0      |  0.9749   |
|  34       | -3.001    |  2.0      |  1.023    |
|  35       | -3.001    |  2.0      |  0.9755   |
=================================================
{'target': -3.00000039014846, 'params': {'x': 2.0, 'y': 0.9993753813483197}}For more tutorial of usages and practices, take a look atBest Practicein documentation.ContributingWe appreciate all contributions to improvehbayes, both logic and system designs. Please refer to CONTRIBUTING.md for more guides.Licensehbayesreleased under the MIT license.