1616 " try:\n " ,
1717 " # Check if notebook is running in Google Colab\n " ,
1818 " import google.colab\n " ,
19+ " !pip install matplotlib==3.1.3\n " ,
1920 " # Get additional files from Github\n " ,
2021 " !wget https://raw.githubusercontent.com/krasserm/bayesian-machine-learning/dev/bayesian-optimization/bayesian_optimization_util.py\n " ,
2122 " # Install additional dependencies\n " ,
22- " !pip install scikit-optimize==0.5.2 \n " ,
23- " !pip install GPy==1.9.8 \n " ,
24- " !pip install GPyOpt==1.2.1 \n " ,
25- " !pip install xgboost==0.90 \n " ,
23+ " !pip install scikit-optimize==0.9.0 \n " ,
24+ " !pip install GPy==1.10.0 \n " ,
25+ " !pip install GPyOpt==1.2.6 \n " ,
26+ " !pip install xgboost==1.7.2 \n " ,
2627 " except:\n " ,
2728 " pass"
2829 ]
245246 " \n " ,
246247 " def min_obj(X):\n " ,
247248 " # Minimization objective is the negative acquisition function\n " ,
248- " return -acquisition(X.reshape(-1, dim), X_sample, Y_sample, gpr)\n " ,
249+ " return -acquisition(X.reshape(-1, dim), X_sample, Y_sample, gpr).flatten() \n " ,
249250 " \n " ,
250251 " # Find the best optimum by starting from n_restart different random points.\n " ,
251252 " for x0 in np.random.uniform(bounds[:, 0], bounds[:, 1], size=(n_restarts, dim)):\n " ,
695696 },
696697 "nbformat" : 4 ,
697698 "nbformat_minor" : 2
698- }
699+ }
0 commit comments