I am trying to implement a Bayesian optimization but already starting having an error while importing 'gp_minimize' from scikit-optimize package from skopt import gp_minimize
res = gp_minimize(f, # the function to minimize
[(-2.0, 2.0)], # the bounds on each dimension of x
acq_func="EI", # the acquisition function
n_calls=15, # the number of evaluations of f
n_random_starts=5, # the number of random initialization points
noise=0.1**2, # the noise level (optional)
random_state=1234) # the random seed*
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-13-8761d45476ed> in <module>
----> 1 from skopt import gp_minimize
2
3 res = gp_minimize(f, # the function to minimize
4 [(-2.0, 2.0)], # the bounds on each dimension of x
5 acq_func="EI", # the acquisition function
~\Anaconda3\lib\site-packages\skopt\__init__.py in <module>
50 from . import benchmarks
51 from . import callbacks
---> 52 from . import learning
53 from . import optimizer
54
~\Anaconda3\lib\site-packages\skopt\learning\__init__.py in <module>
4 from .forest import ExtraTreesRegressor
5 from .gaussian_process import GaussianProcessRegressor
----> 6 from .gbrt import GradientBoostingQuantileRegressor
7
8
~\Anaconda3\lib\site-packages\skopt\learning\gbrt.py in <module>
5 from sklearn.ensemble import GradientBoostingRegressor
6 from sklearn.utils import check_random_state
----> 7 from sklearn.externals.joblib import Parallel, delayed
8
9
ModuleNotFoundError: No module named 'sklearn.externals.joblib'
I already downloaded all required packages such joblib and scikit learn and scikit optimize, so I can't figure out why it's not working.
Solution = Finally, I reinstalled Anaconda et scikit-optimizer again and all worked.